Skip to content

Commit

Permalink
chore(ci): Split formatting check into separate job (#11332)
Browse files Browse the repository at this point in the history
This reverts #11324 and adds a dedicated job for checking the
formatting. We need to check formatting on all PRs so having a
standalone job like this makes sense to me.
  • Loading branch information
Josh-Walker-GM committed Aug 21, 2024
1 parent ebf321b commit 68c6a57
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,24 @@ jobs:
steps:
- run: echo "Skipped"

formatting-check:
name: πŸ“ Check formatting (prettier)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up job
uses: ./.github/actions/set-up-job
with:
set-up-yarn-cache: false
yarn-install-directory: .
build: false

- name: πŸ“ Check formatting (prettier)
run: yarn format:check

build-lint-test:
needs: detect-changes
needs: check

strategy:
matrix:
Expand All @@ -90,25 +106,33 @@ jobs:
- name: πŸ”Ž Lint
run: yarn lint

- name: πŸ“ Check formatting (prettier)
run: yarn format:check

- name: πŸ₯‘ Check packaging and attw
run: yarn check:package
if: needs.detect-changes.outputs.code == 'true'

- name: 🌑 Test Types
run: yarn test:types
if: needs.detect-changes.outputs.code == 'true'

- name: Get number of CPU cores
if: needs.detect-changes.outputs.code == 'true'
if: always()
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@v2

- name: πŸ§ͺ Test
run: yarn test-ci --minWorkers=1 --maxWorkers=${{ steps.cpu-cores.outputs.count }}
if: needs.detect-changes.outputs.code == 'true'

build-lint-test-skip:
needs: detect-changes
if: needs.detect-changes.outputs.code == 'false'

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

name: πŸ— Build, lint, test / ${{ matrix.os }} / node 20 latest
runs-on: ${{ matrix.os }}

steps:
- run: echo "Skipped"

tutorial-e2e:
needs: check
Expand Down

0 comments on commit 68c6a57

Please sign in to comment.