Skip to content

Commit 7a5696b

Browse files
committed
Update GitHub Actions workflow for v3 build
Split workflow into two jobs: - build-test-v3: Builds and tests v3 directory (Node 18, npm) - build-test-legacy: Builds legacy v0.1.x (only on master branch) Changes: - Updated to actions/checkout@v4 and actions/setup-node@v4 - v3 job runs on all branches/PRs - Legacy job only runs on master branch - v3 uses npm ci and working-directory for isolation - Node 18 for v3 (matches package.json engines requirement) This allows v3 development in branches while keeping legacy builds working on master.
1 parent 8afd40e commit 7a5696b

1 file changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,42 @@ on:
99
- master
1010

1111
jobs:
12-
build-test:
12+
build-test-v3:
13+
name: Build and Test v3
1314
runs-on: ubuntu-latest
1415

1516
steps:
1617
- name: Checkout code
17-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1819

1920
- name: Use Node.js
20-
uses: actions/setup-node@v1
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 18.x
24+
25+
- name: Install v3 dependencies
26+
working-directory: ./v3
27+
run: npm ci
28+
29+
- name: Build v3
30+
working-directory: ./v3
31+
run: npm run build
32+
33+
- name: Run v3 tests
34+
working-directory: ./v3
35+
run: npm test
36+
37+
build-test-legacy:
38+
name: Build and Test Legacy (v0.1.x)
39+
runs-on: ubuntu-latest
40+
if: github.ref == 'refs/heads/master'
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Use Node.js
47+
uses: actions/setup-node@v4
2148
with:
2249
node-version: 14.x
2350

0 commit comments

Comments
 (0)