Skip to content

Commit

Permalink
ci: use matrix strategy for common commands (#2435)
Browse files Browse the repository at this point in the history
Also issue `analyze` command in CI to have reports of cycles
  • Loading branch information
ferferga authored Aug 23, 2024
1 parent 2b8f533 commit a7566b9
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/__quality_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ jobs:
base-ref: ${{ github.event.pull_request.base.sha || 'master' }}
head-ref: ${{ github.event.pull_request.head.sha || github.ref }}

lint:
name: Lint πŸ”¬
quality:
name: Check ${{ matrix.command }} πŸ•΅οΈβ€β™‚οΈ
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
command:
- lint
- typecheck
- analyze
defaults:
run:
working-directory: frontend
Expand All @@ -50,34 +57,8 @@ jobs:
- name: Install dependencies πŸ“¦
run: npm ci --no-audit

- name: Run linter ✏️
run: npm run lint

typecheck:
name: Typecheck 🈯
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

steps:
- name: Checkout ⬇️
uses: actions/[email protected]
with:
ref: ${{ inputs.commit }}
show-progress: false

- name: Setup node environment βš™οΈ
uses: actions/[email protected]
with:
node-version: 20
check-latest: true

- name: Install dependencies πŸ“¦
run: npm ci --no-audit

- name: Run typecheck πŸ“–
run: npm run typecheck
- name: Run ${{ matrix.command }} βš™οΈ
run: npm run ${{ matrix.command }}

commits_checks:
name: Commit linting πŸ’¬βœ…
Expand Down

0 comments on commit a7566b9

Please sign in to comment.