Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Split formatting check into separate job #11332

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading