Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable @wordpress/stylelint-config #44

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: '@wordpress/stylelint-config'
on:
push:
branches:
- main
paths:
- .github/workflows/test-package.yml
- .github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml
pull_request:
paths:
- .github/workflows/test-package.yml
- .github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml
workflow_dispatch: null
schedule:
- cron: 0 0 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref
}}-wordpress-stylelint-config-54e-latest
cancel-in-progress: true
jobs:
test:
uses: ./.github/workflows/test-package.yml
name: latest
with:
package: '@wordpress/stylelint-config'
stylelint-version: stylelint@latest
working-directory-is-workspace: true
build-command: exit 0
test-command: npm run test:unit -- --testPathPattern packages/stylelint-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: '@wordpress/stylelint-config'
on:
push:
branches:
- main
paths:
- .github/workflows/test-package.yml
- .github/workflows/test-package-wordpress-stylelint-config-54e.next.yml
pull_request:
paths:
- .github/workflows/test-package.yml
- .github/workflows/test-package-wordpress-stylelint-config-54e.next.yml
workflow_dispatch: null
schedule:
- cron: 0 0 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-wordpress-stylelint-config-54e-next
cancel-in-progress: true
jobs:
test:
uses: ./.github/workflows/test-package.yml
name: next
with:
package: '@wordpress/stylelint-config'
stylelint-version: stylelint/stylelint
working-directory-is-workspace: true
build-command: exit 0
test-command: npm run test:unit -- --testPathPattern packages/stylelint-config
13 changes: 8 additions & 5 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
stylelint-version-override:
type: string
description: The Stylelint version override
working-directory-is-workspace:
Copy link
Member Author

@romainmenke romainmenke Jan 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm workspaces often assume that npm install and other commands are run from the project root.

type: boolean
description: Run all commands from the workspace root
set-overrides-command:
type: string
description: The command to set dependency overrides
Expand Down Expand Up @@ -95,7 +98,7 @@ jobs:
npm pkg get;

- name: Install dependencies
working-directory: ${{ steps.repo-info.outputs.directory }}
working-directory: ${{ inputs.working-directory-is-workspace && github.workspace || steps.repo-info.outputs.directory }}
env:
PACKAGE_URL: ${{ steps.repo-info.outputs.url }}
INSTALL_COMMAND: ${{ inputs.install-command }}
Expand All @@ -106,7 +109,7 @@ jobs:
fi

- name: Install Stylelint ${{ inputs.stylelint-version }}
working-directory: ${{ steps.repo-info.outputs.directory }}
working-directory: ${{ inputs.working-directory-is-workspace && github.workspace || steps.repo-info.outputs.directory }}
if: ${{ ! inputs.set-overrides-command }}
env:
STYLELINT_VERSION: ${{ inputs.stylelint-version }}
Expand All @@ -118,7 +121,7 @@ jobs:
fi

- name: List installed Stylelint versions
working-directory: ${{ steps.repo-info.outputs.directory }}
working-directory: ${{ inputs.working-directory-is-workspace && github.workspace || steps.repo-info.outputs.directory }}
env:
PACKAGE_URL: ${{ steps.repo-info.outputs.url }}
LIST_INSTALLED_VERSIONS_COMMAND: ${{ inputs.list-installed-versions-command }}
Expand All @@ -129,7 +132,7 @@ jobs:
fi

- name: Run build
working-directory: ${{ steps.repo-info.outputs.directory }}
working-directory: ${{ inputs.working-directory-is-workspace && github.workspace || steps.repo-info.outputs.directory }}
env:
PACKAGE_URL: ${{ steps.repo-info.outputs.url }}
BUILD_COMMAND: ${{ inputs.build-command }}
Expand All @@ -140,7 +143,7 @@ jobs:
fi

- name: Run test
working-directory: ${{ steps.repo-info.outputs.directory }}
working-directory: ${{ inputs.working-directory-is-workspace && github.workspace || steps.repo-info.outputs.directory }}
env:
PACKAGE_URL: ${{ steps.repo-info.outputs.url }}
TEST_COMMAND: ${{ inputs.test-command }}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ To see test results, click the status badge for the relevant package in the list
| [![@shopify/stylelint-plugin](https://img.shields.io/npm/v/@shopify/stylelint-plugin.svg)](https://www.npmjs.com/package/@shopify/stylelint-plugin) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-shopify-stylelint-plugin-a90.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-shopify-stylelint-plugin-a90.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-shopify-stylelint-plugin-a90.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-shopify-stylelint-plugin-a90.next.yml) |
| [![@stylistic/stylelint-config](https://img.shields.io/npm/v/@stylistic/stylelint-config.svg)](https://www.npmjs.com/package/@stylistic/stylelint-config) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-config-52f.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-config-52f.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-config-52f.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-config-52f.next.yml) |
| [![@stylistic/stylelint-plugin](https://img.shields.io/npm/v/@stylistic/stylelint-plugin.svg)](https://www.npmjs.com/package/@stylistic/stylelint-plugin) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-plugin-ee6.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-plugin-ee6.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-plugin-ee6.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylistic-stylelint-plugin-ee6.next.yml) |
| [![@wordpress/stylelint-config](https://img.shields.io/npm/v/@wordpress/stylelint-config.svg)](https://www.npmjs.com/package/@wordpress/stylelint-config) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-wordpress-stylelint-config-54e.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-wordpress-stylelint-config-54e.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-wordpress-stylelint-config-54e.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-wordpress-stylelint-config-54e.next.yml) |
| [![stylelint-actions-formatters](https://img.shields.io/npm/v/stylelint-actions-formatters.svg)](https://www.npmjs.com/package/stylelint-actions-formatters) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-actions-formatters-e5a.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-actions-formatters-e5a.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-actions-formatters-e5a.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-actions-formatters-e5a.next.yml) |
| [![stylelint-checkstyle-reporter](https://img.shields.io/npm/v/stylelint-checkstyle-reporter.svg)](https://www.npmjs.com/package/stylelint-checkstyle-reporter) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-checkstyle-reporter-af7.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-checkstyle-reporter-af7.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-checkstyle-reporter-af7.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-checkstyle-reporter-af7.next.yml) |
| [![stylelint-config-clean-order](https://img.shields.io/npm/v/stylelint-config-clean-order.svg)](https://www.npmjs.com/package/stylelint-config-clean-order) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-config-clean-order-cd2.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-config-clean-order-cd2.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-config-clean-order-cd2.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-config-clean-order-cd2.next.yml) |
Expand Down Expand Up @@ -58,7 +59,7 @@ To see test results, click the status badge for the relevant package in the list
| [![stylelint-use-nesting](https://img.shields.io/npm/v/stylelint-use-nesting.svg)](https://www.npmjs.com/package/stylelint-use-nesting) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-use-nesting-54f.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-use-nesting-54f.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-use-nesting-54f.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-use-nesting-54f.next.yml) |
| [![stylelint-value-no-unknown-custom-properties](https://img.shields.io/npm/v/stylelint-value-no-unknown-custom-properties.svg)](https://www.npmjs.com/package/stylelint-value-no-unknown-custom-properties) | [![latest](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-value-no-unknown-custom-properties-2f3.latest.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-value-no-unknown-custom-properties-2f3.latest.yml) | [![next](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-value-no-unknown-custom-properties-2f3.next.yml/badge.svg)](https://github.com/stylelint/stylelint-ecosystem-tester/actions/workflows/test-package-stylelint-value-no-unknown-custom-properties-2f3.next.yml) |

Total 43 packages
Total 44 packages

<!-- END:PACKAGES -->

Expand Down
9 changes: 8 additions & 1 deletion data/ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ packages:
]
- '@stylistic/stylelint-config'
- '@stylistic/stylelint-plugin'
# - '@wordpress/stylelint-config'
- [
'@wordpress/stylelint-config',
{
working-directory-is-workspace: true,
build-command: 'exit 0',
test-command: 'npm run test:unit -- --testPathPattern packages/stylelint-config',
},
]
- 'stylelint-actions-formatters'
- 'stylelint-checkstyle-reporter'
- 'stylelint-config-clean-order'
Expand Down
4 changes: 4 additions & 0 deletions scripts/update-workflows.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function generateWorkflow({
workflow.jobs.test.with.package = pkg;
workflow.jobs.test.with['stylelint-version'] = stylelintVersion;

if (config['working-directory-is-workspace']) {
workflow.jobs.test.with['working-directory-is-workspace'] = true;
}

if (config['set-overrides-command']) {
workflow.jobs.test.with['set-overrides-command'] = config['set-overrides-command'];
workflow.jobs.test.with['stylelint-version-override'] = stylelintVersionOverride;
Expand Down
Loading