Skip to content

Commit

Permalink
Tweak CI workflow (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Jul 3, 2024
1 parent 89daf23 commit e36c110
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,28 @@ env:
ASTRO_TELEMETRY_DISABLED: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
packages:
- 'packages/**'
unit-test:
name: Run unit tests
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -33,6 +52,8 @@ jobs:

e2e-test:
name: 'Run E2E tests (${{ matrix.os }})'
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -51,7 +72,7 @@ jobs:

type-check:
name: Run type checks
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -68,7 +89,7 @@ jobs:

pa11y:
name: Check for accessibility issues
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -112,7 +133,9 @@ jobs:

links:
name: Check for broken links
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit e36c110

Please sign in to comment.