Improvements #154
Workflow file for this run
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
| on: | |
| pull_request: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| task: [oxlint, oxfmt, build, test] | |
| env: | |
| SKIP_CI: ${{ startsWith(github.head_ref, 'changeset-release/') }} | |
| steps: | |
| - name: Skip redundant CI on release PRs | |
| if: ${{ env.SKIP_CI == 'true' }} | |
| run: echo "Skipping ${{ matrix.task }} for changeset release PR" | |
| - uses: actions/checkout@v4 | |
| if: ${{ env.SKIP_CI != 'true' }} | |
| - uses: jdx/mise-action@v2 | |
| if: ${{ env.SKIP_CI != 'true' }} | |
| - run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| if: ${{ env.SKIP_CI != 'true' }} | |
| - uses: actions/cache@v4 | |
| if: ${{ env.SKIP_CI != 'true' }} | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - run: mise run install --frozen-lockfile | |
| if: ${{ env.SKIP_CI != 'true' }} | |
| - name: Cache Playwright Browsers | |
| id: playwright-cache | |
| if: ${{ env.SKIP_CI != 'true' && matrix.task == 'test' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Install Playwright Browsers | |
| if: ${{ env.SKIP_CI != 'true' && matrix.task == 'test' && steps.playwright-cache.outputs.cache-hit != 'true' }} | |
| run: pnpm exec playwright install --with-deps chromium | |
| env: | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0 | |
| - run: mise run ${{ matrix.task }} | |
| if: ${{ env.SKIP_CI != 'true' }} |