Skip to content

Commit

Permalink
Use parallel builds in workflow for improved CI times
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Jan 9, 2024
1 parent d8ae39a commit a00d417
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 21 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ on:
- main

jobs:
test:
name: Check Code
build:
runs-on: ubuntu-latest
env:
DISPLAY: :99.0
strategy:
matrix:
node-version: [16.x, 18.x]
Expand All @@ -34,5 +31,56 @@ jobs:
- name: Build libraries and distributions ${{ matrix.node-version }}
run: pnpm build

- name: Check Code ${{ matrix.node-version }}
run: pnpm check:ci
format:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: 18.x

- name: Format
run: pnpm format

lint:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: 18.x

- name: Lint
run: pnpm lint

types:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- name: Types Check ${{ matrix.node-version }}
run: pnpm types:check

test:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- name: Test ${{ matrix.node-version }}
run: pnpm jest
15 changes: 0 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@
"changeset": "changeset",
"start": "concurrently --raw \"pnpm:build:lib:esm --watch\" \"webpack serve --config ./config/webpack/demo/webpack.config.dev.js --static demo/js --entry ./demo/js/app\"",
"start:ts": "concurrently --raw \"pnpm:build:typescript --watch\" \"webpack serve --config ./config/webpack/demo/webpack.config.dev.js --static demo/ts --entry ./demo/ts/app\"",
"check": "wireit",
"check:ci": "wireit",
"check:debug": "cross-env WIREIT_PARALLEL=1 pnpm check",
"clean:build": "rimraf coverage \"packages/*/{dist,es,lib}\"",
"clean:cache": "wireit",
Expand Down Expand Up @@ -175,19 +173,6 @@
"clean:cache:modules"
]
},
"check": {
"dependencies": [
"format",
"lint",
"jest",
"types:check"
]
},
"check:ci": {
"dependencies": [
"check"
]
},
"build": {
"dependencies": [
"./packages/victory-native:build",
Expand Down

0 comments on commit a00d417

Please sign in to comment.