chore: update node version in bug report template #364
This file contains 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/CD Build Workflow | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
NPM_VERSION: 21.7.2 | |
jobs: | |
pre_job: | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
paths_result: ${{ steps.skip_check.outputs.paths_result }} | |
permissions: | |
actions: write | |
contents: read | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1 | |
with: | |
do_not_skip: '["schedule", "workflow_dispatch"]' | |
paths_ignore: '["**/CHANGELOG.md", "**/LICENSE", "**/README.md"]' | |
paths_filter: | | |
core: | |
paths: | |
- 'packages/core/**' | |
- 'integration/core/**' | |
react: | |
paths: | |
- 'packages/react/**' | |
- 'e2e/apps/react/**' | |
- 'e2e/tests/**' | |
vue: | |
paths: | |
- 'packages/vue/**' | |
- 'e2e/apps/vue/**' | |
- 'e2e/tests/**' | |
laravel: | |
paths: | |
- 'packages/laravel/**' | |
skip_after_successful_duplicate: false | |
# We want to skip only concurrent runs. Subsequent runs/retries should be allowed. | |
core: | |
name: Core Package CI | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).core.should_skip }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
# Install version depends on package.json `packageManager` field | |
- name: Setup Node.js | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: ${{ env.NPM_VERSION }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --prefer-offline | |
#- name: Run build | |
# run: pnpm run build | |
#- name: Run integration test | |
# run: pnpm run test | |
react: | |
name: React Adapter CI | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).react.should_skip }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: write | |
env: | |
UI: react | |
HOME: /root | |
LARAVEL_BYPASS_ENV_CHECK: 1 | |
container: | |
image: mcr.microsoft.com/playwright:v1.47.2-jammy | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
# Install version depends on package.json `packageManager` field | |
- name: Setup Node.js | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: ${{ env.NPM_VERSION }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --prefer-offline | |
#- name: Run build | |
# run: pnpm run build | |
# - name: Run e2e test | |
# run: 'pnpm run test:react' | |
vue: | |
name: Vue Adapter CI | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).vue.should_skip }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: write | |
env: | |
UI: vue | |
HOME: /root | |
LARAVEL_BYPASS_ENV_CHECK: 1 | |
container: | |
image: mcr.microsoft.com/playwright:v1.47.2-jammy | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
# Install version depends on package.json `packageManager` field | |
- name: Setup Node.js | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: ${{ env.NPM_VERSION }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --prefer-offline | |
#- name: Run build | |
# run: pnpm run build | |
# - name: Run e2e test | |
# run: 'pnpm run test:vue' | |
laravel: | |
name: Laravel Adapter CI | |
needs: pre_job | |
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
php: ['8.1', '8.2', '8.3'] | |
laravel: [9.*, 10.*, 11.*] | |
stability: ['prefer-stable'] | |
include: | |
- laravel: 9.* | |
testbench: ^7.0 | |
- laravel: 10.* | |
testbench: ^8.0 | |
- laravel: 11.* | |
testbench: ^9.0 | |
exclude: | |
- laravel: 10.* | |
php: 8.0 | |
- laravel: 11.* | |
php: 8.1 | |
permissions: | |
contents: write | |
steps: | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Setup PHP | |
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # 20.30.4 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip | |
ini-values: error_reporting=E_ALL | |
tools: composer:v2 | |
coverage: none | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Composer-cache | |
working-directory: 'packages/laravel' | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Cache dependencies | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer-${{ matrix.stability }}- | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Setup problem matchers | |
working-directory: 'packages/laravel' | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Install dependencies | |
working-directory: 'packages/laravel' | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && !fromJSON(needs.pre_job.outputs.paths_result).laravel.should_skip }} | |
name: Run test | |
working-directory: 'packages/laravel' | |
# run: vendor/bin/phpunit | |
# This job is the final job that runs after all other jobs and is used for branch protection status checks. | |
# See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks | |
# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101 | |
build-result: | |
name: Build Result | |
needs: [pre_job, core, react, vue, laravel] | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
steps: | |
- name: Debug build result | |
run: | | |
echo "pre_job_result: ${{ needs.pre_job.outputs.should_skip }}" | |
echo "core_job_result: ${{ needs.core.result }}" | |
echo "react_job_result: ${{ needs.react.result }}" | |
echo "vue_job_result: ${{ needs.vue.result }}" | |
echo "laravel_job_result: ${{ needs.laravel.result }}" | |
- name: Check status of all precursor jobs | |
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
run: exit 1 |