Skip to content

Commit cfd736f

Browse files
committed
Refine build workflow
1 parent 30d11b7 commit cfd736f

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/build.yml

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

48-
smoke-tests-esm:
49-
name: "Smoke tests (ESM)"
48+
smoke-tests-commonjs:
49+
name: "Smoke tests (CommonJS)"
5050
needs: build
5151
runs-on: ubuntu-22.04
5252
strategy:
5353
matrix:
54-
node-version: [18.x]
54+
node-version: [7.x]
5555
steps:
5656
- name: Checkout repo
5757
uses: actions/checkout@v3
@@ -72,17 +72,17 @@ jobs:
7272

7373
- name: Run smoke tests
7474
run: |
75-
cd tests/smoke/esm
75+
cd tests/smoke/commonjs
7676
npm i
7777
npm start
7878
79-
smoke-tests-commonjs:
80-
name: "Smoke tests (commonjs)"
79+
smoke-tests-esm:
80+
name: "Smoke tests (ESM)"
8181
needs: build
8282
runs-on: ubuntu-22.04
8383
strategy:
8484
matrix:
85-
node-version: [7.x]
85+
node-version: [18.x]
8686
steps:
8787
- name: Checkout repo
8888
uses: actions/checkout@v3
@@ -103,6 +103,6 @@ jobs:
103103

104104
- name: Run smoke tests
105105
run: |
106-
cd tests/smoke/commonjs
106+
cd tests/smoke/esm
107107
npm i
108108
npm start

tests/smoke/commonjs/commonjs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,7 @@ const run = async () => {
133133
console.log("success", process.versions.node);
134134
};
135135

136-
run();
136+
run().catch((e) => {
137+
console.error(e);
138+
process.exitCode = 1;
139+
});

0 commit comments

Comments
 (0)