Skip to content

Commit 30d11b7

Browse files
committed
Refine build workflow
1 parent 227e2d0 commit 30d11b7

1 file changed

Lines changed: 35 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
path: npm.zip
4646
retention-days: 1
4747

48-
smoke-tests:
49-
name: "Smoke tests for different Node.js versions"
48+
smoke-tests-esm:
49+
name: "Smoke tests (ESM)"
5050
needs: build
5151
runs-on: ubuntu-22.04
5252
strategy:
@@ -70,9 +70,39 @@ jobs:
7070
- name: Unzip build files
7171
run: unzip npm.zip
7272

73-
- name: Run smoke tests (esm)
73+
- name: Run smoke tests
7474
run: |
75-
echo ${{ matrix.node-version >= 14 }}
7675
cd tests/smoke/esm
7776
npm i
78-
npm run esm
77+
npm start
78+
79+
smoke-tests-commonjs:
80+
name: "Smoke tests (commonjs)"
81+
needs: build
82+
runs-on: ubuntu-22.04
83+
strategy:
84+
matrix:
85+
node-version: [7.x]
86+
steps:
87+
- name: Checkout repo
88+
uses: actions/checkout@v3
89+
90+
- name: Setup Node
91+
uses: actions/setup-node@v3
92+
with:
93+
node-version: ${{ matrix.node-version }}
94+
registry-url: 'https://registry.npmjs.org'
95+
96+
- name: Download build files
97+
uses: actions/download-artifact@v3
98+
with:
99+
name: npm
100+
101+
- name: Unzip build files
102+
run: unzip npm.zip
103+
104+
- name: Run smoke tests
105+
run: |
106+
cd tests/smoke/commonjs
107+
npm i
108+
npm start

0 commit comments

Comments
 (0)