diff --git a/.github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml b/.github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml new file mode 100644 index 0000000..5b279a8 --- /dev/null +++ b/.github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml @@ -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 diff --git a/.github/workflows/test-package-wordpress-stylelint-config-54e.next.yml b/.github/workflows/test-package-wordpress-stylelint-config-54e.next.yml new file mode 100644 index 0000000..b53efec --- /dev/null +++ b/.github/workflows/test-package-wordpress-stylelint-config-54e.next.yml @@ -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 diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index d8761a4..a1c25fb 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -14,6 +14,9 @@ on: stylelint-version-override: type: string description: The Stylelint version override + working-directory-is-workspace: + type: boolean + description: Run all commands from the workspace root set-overrides-command: type: string description: The command to set dependency overrides @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} diff --git a/README.md b/README.md index 5847bb0..b30feb5 100644 --- a/README.md +++ b/README.md @@ -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) | @@ -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 diff --git a/data/ecosystem.yml b/data/ecosystem.yml index 5da8ca6..fca34f7 100644 --- a/data/ecosystem.yml +++ b/data/ecosystem.yml @@ -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' diff --git a/scripts/update-workflows.js b/scripts/update-workflows.js index 42e625d..90c6861 100644 --- a/scripts/update-workflows.js +++ b/scripts/update-workflows.js @@ -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;