Skip to content

Commit a474b91

Browse files
committed
chore: separate the build_test into two different jobs to save time
1 parent 60054a8 commit a474b91

File tree

2 files changed

+45
-21
lines changed

2 files changed

+45
-21
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Build
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- release/*
11+
pull_request:
12+
branches:
13+
- main
14+
- release/*
15+
16+
# Allows GitHub to use this workflow to validate the merge queue
17+
merge_group:
18+
19+
# Allows you to run this workflow manually from the Actions tab
20+
workflow_dispatch:
21+
22+
env:
23+
NODE_OPTIONS: --max_old_space_size=16384
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Use Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version-file: .nvmrc
35+
cache: npm
36+
cache-dependency-path: ./package-lock.json
37+
- run: npm ci --no-audit --no-fund --prefer-offline
38+
- run: npm run lint:errors
39+
- run: npm run build:for:npm
40+
- run: npm run generate:jsonschema:dist
Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Build and test
4+
name: Test
55

66
on:
77
push:
@@ -26,21 +26,15 @@ jobs:
2626
build:
2727
runs-on: ubuntu-latest
2828

29-
strategy:
30-
matrix:
31-
node-version: [20]
32-
3329
steps:
3430
- uses: actions/checkout@v4
35-
- name: Use Node.js ${{ matrix.node-version }}
31+
- name: Use Node.js
3632
uses: actions/setup-node@v4
3733
with:
38-
node-version: ${{ matrix.node-version }}
39-
cache: 'npm'
34+
node-version-file: .nvmrc
35+
cache: npm
36+
cache-dependency-path: ./package-lock.json
4037
- run: npm ci --no-audit --no-fund --prefer-offline
41-
- run: npm run lint:errors
42-
- run: npm run build
43-
- run: npm run generate:jsonschema:dist
4438
- run: npx playwright install --with-deps
4539
- run: npm test
4640
- name: Upload Code Coverage reports
@@ -50,13 +44,3 @@ jobs:
5044
name: code-coverage
5145
path: coverage/
5246
retention-days: 30
53-
# Commented out since it is outdated and is quite spammy
54-
# - name: Report code coverage
55-
# uses: zgosalvez/github-actions-report-lcov@v2
56-
# if: always()
57-
# continue-on-error: true
58-
# with:
59-
# coverage-files: coverage/lcov.info
60-
# artifact-name: code-coverage-report
61-
# github-token: ${{ secrets.GITHUB_TOKEN }}
62-
# working-directory: ./

0 commit comments

Comments
 (0)