chore(main): release 0.1.1 #230
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| detect: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| php: ${{ steps.filter.outputs.php }} | |
| phpcs: ${{ steps.filter.outputs.phpcs }} | |
| phpstan: ${{ steps.filter.outputs.phpstan }} | |
| phpunit: ${{ steps.filter.outputs.phpunit }} | |
| js: ${{ steps.filter.outputs.js }} | |
| css: ${{ steps.filter.outputs.css }} | |
| e2e: ${{ steps.filter.outputs.e2e }} | |
| jest: ${{ steps.filter.outputs.jest }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| # Omit this or set it to true if later steps in this job need authenticated git operations (for example, in private repositories). | |
| with: | |
| persist-credentials: false | |
| - name: Detect file changes | |
| uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| php: | |
| - '**.php' | |
| - 'composer.*' | |
| phpcs: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-phpcs-public.yml' # Update this if using private reusable workflow | |
| - '.phpcs.xml.dist' | |
| phpstan: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-phpstan-public.yml' # Update this if using private reusable workflow | |
| - 'phpstan.neon.dist' | |
| phpunit: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-phpunit-public.yml' # Update this if using private reusable workflow | |
| - 'tests/**/*.php' | |
| - 'phpunit.xml.dist' | |
| - 'package*.json' | |
| - '.wp-env.test.json' | |
| js: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-lint-css-js-public.yml' # Update this if using private reusable workflow | |
| - '.nvmrc' | |
| - '**.cjs' | |
| - '**.js' | |
| - '**.jsx' | |
| - '**.mjs' | |
| - '**.cts' | |
| - '**.mts' | |
| - '**.ts' | |
| - '**.tsx' | |
| - 'package*.json' | |
| - 'tsconfig*.json' | |
| css: | |
| - '**.css' | |
| - '**.scss' | |
| - '.editorconfig' | |
| - '.browserslistrc' | |
| - '.stylelintignore' | |
| - '.stylelint.config.js' | |
| e2e: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-e2e-public.yml' # Update this if using private reusable workflow | |
| - 'tests/e2e/**/*' | |
| - 'playwright.config.ts' | |
| jest: | |
| - '.github/workflows/ci.yml' | |
| - '.github/workflows/reusable-jest-public.yml' # Update this if using private reusable workflow | |
| - 'tests/js/**/*' | |
| - 'src/**/__tests__/**/*' | |
| - 'src/**/*.test.ts' | |
| - 'src/**/*.test.tsx' | |
| - 'src/**/*.spec.ts' | |
| - 'src/**/*.spec.tsx' | |
| - 'jest.config.js' | |
| - 'package*.json' | |
| - '.wp-env.test.json' | |
| phpcs: | |
| name: PHPCS | |
| needs: detect | |
| if: needs.detect.outputs.php == 'true' || needs.detect.outputs.phpcs == 'true' | |
| uses: ./.github/workflows/reusable-phpcs-public.yml | |
| # uses: ./.github/workflows/reusable-phpcs.yml | |
| permissions: | |
| contents: read | |
| with: | |
| php-version: '8.2' | |
| phpstan: | |
| name: PHPStan | |
| needs: detect | |
| if: needs.detect.outputs.php == 'true' || needs.detect.outputs.phpstan == 'true' | |
| uses: ./.github/workflows/reusable-phpstan-public.yml | |
| # uses: ./.github/workflows/reusable-phpstan.yml | |
| permissions: | |
| contents: read | |
| with: | |
| php-version: '8.2' | |
| lint-css-js: | |
| name: CSS/JS Lint | |
| needs: detect | |
| if: needs.detect.outputs.css == 'true' || needs.detect.outputs.js == 'true' | |
| uses: ./.github/workflows/reusable-lint-css-js-public.yml | |
| # uses: ./.github/workflows/reusable-lint-css-js.yml | |
| permissions: | |
| contents: read | |
| jest: | |
| name: Jest Unit Tests | |
| needs: detect | |
| if: needs.detect.outputs.js == 'true' || needs.detect.outputs.jest == 'true' | |
| uses: ./.github/workflows/reusable-jest-public.yml | |
| # uses: ./.github/workflows/reusable-jest.yml | |
| permissions: | |
| contents: read | |
| with: | |
| coverage: true | |
| phpunit: | |
| name: PHPUnit (PHP ${{ matrix.php }}, WP ${{ matrix.wp }}) | |
| needs: [detect, build-plugin-zip] | |
| if: needs.detect.outputs.php == 'true' || needs.detect.outputs.phpunit == 'true' | |
| uses: ./.github/workflows/reusable-phpunit-public.yml | |
| # uses: ./.github/workflows/reusable-phpunit.yml | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| # Uncomment this on private runners, which can't run multiple wp-env instances in parallel. | |
| max-parallel: 1 | |
| matrix: | |
| php: ['8.4', '8.3', '8.2'] | |
| wp: ['latest'] | |
| include: | |
| - php: '8.4' | |
| wp: 'latest' | |
| coverage: true | |
| with: | |
| php-version: ${{ matrix.php }} | |
| wp-version: ${{ matrix.wp }} | |
| coverage: ${{ matrix.coverage == true }} | |
| secrets: inherit | |
| e2e: | |
| name: E2E Tests | |
| needs: [detect, build-plugin-zip] | |
| # needs: phpstan | |
| if: needs.detect.outputs.php == 'true' || needs.detect.outputs.e2e == 'true' || needs.detect.outputs.js == 'true' || needs.detect.outputs.css == 'true' | |
| uses: ./.github/workflows/reusable-e2e-public.yml | |
| # uses: ./.github/workflows/reusable-e2e.yml | |
| permissions: | |
| contents: read | |
| with: | |
| php-version: '8.2' | |
| build-plugin-zip: | |
| name: Build Plugin Zip | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/reusable-build-public.yml | |
| # uses: ./.github/workflows/reusable-build.yml | |
| with: | |
| php-version: '8.2' | |
| artifact-name: plugin-skeleton-d-pr${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} | |
| secrets: inherit | |
| playground-preview: | |
| name: Playground Preview | |
| needs: build-plugin-zip | |
| if: github.event_name == 'pull_request' | |
| uses: ./.github/workflows/reusable-wp-playground-pr-preview-public.yml | |
| # uses: ./.github/workflows/reusable-wp-playground-pr-preview.yml | |
| permissions: | |
| actions: read | |
| contents: write | |
| pull-requests: write | |
| with: | |
| run-id: ${{ github.run_id }} | |
| artifact-prefix: 'plugin-skeleton-d-pr' | |
| artifact-filename: 'plugin-skeleton-d.zip' |