From 8dae5bbdc8a308f26f05f8178146984362eaa247 Mon Sep 17 00:00:00 2001 From: Charlie Brown Date: Wed, 10 Jan 2024 06:40:39 -0600 Subject: [PATCH] Use parallel builds in workflow for improved CI times (#2705) --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++++---- package.json | 6 ---- 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43fa7bb23..052057f75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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] @@ -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 diff --git a/package.json b/package.json index 90920854d..f4a5bc523 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,6 @@ "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", @@ -183,11 +182,6 @@ "types:check" ] }, - "check:ci": { - "dependencies": [ - "check" - ] - }, "build": { "dependencies": [ "./packages/victory-native:build",