Try parallelize tests and build

This commit is contained in:
Daniel Imms
2023-08-22 06:52:57 -07:00
parent 6f0a5c9f0c
commit 1744801867
+22 -20
View File
@@ -70,7 +70,6 @@ jobs:
run: yarn lint-api
unit-tests:
needs: build
strategy:
matrix:
node-version: [16, 18]
@@ -78,6 +77,15 @@ jobs:
runs-on: ${{ matrix.runs-on }}-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Wait for build job
uses: NathanFirmo/wait-for-other-job@v1.1.1
- uses: actions/download-artifact@v3
with:
name: build-artifacts
@@ -89,18 +97,10 @@ jobs:
run: 7z x compressed-build.zip -aoa -o${{ github.workspace }}
- name: Print directory structure
run: ls -R
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Unit tests
run: yarn test-unit --forbid-only
integration-tests:
needs: build
strategy:
matrix:
node-version: [18]
@@ -109,17 +109,6 @@ jobs:
runs-on: ${{ matrix.runs-on }}-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Unzip artifacts (Linux, macOS)
if: runner.os != 'Windows'
run: unzip -o compressed-build.zip
- name: Unzip artifacts (Windows)
if: runner.os == 'Windows'
run: 7z x compressed-build.zip -aoa -o${{ github.workspace }}
- name: Print directory structure
run: ls -R
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v3
with:
@@ -129,5 +118,18 @@ jobs:
run: yarn --frozen-lockfile
- name: Install playwright
run: npx playwright install
- name: Wait for build job
uses: NathanFirmo/wait-for-other-job@v1.1.1
- uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Unzip artifacts (Linux, macOS)
if: runner.os != 'Windows'
run: unzip -o compressed-build.zip
- name: Unzip artifacts (Windows)
if: runner.os == 'Windows'
run: 7z x compressed-build.zip -aoa -o${{ github.workspace }}
- name: Print directory structure
run: ls -R
- name: Integration tests (${{ matrix.browser }})
run: yarn test-api-${{ matrix.browser }} --headless --forbid-only