Skip to content

Commit dc678cf

Browse files
authored
Merge pull request #5 from rsantosdev/rsantosdev-patch-2
Improve CI
2 parents c1b99d9 + bfc56df commit dc678cf

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

.github/workflows/node.js.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
1-
# This workflow will do a clean install of node dependencies, 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
1+
name: Node CI
32

4-
name: Node.js CI
5-
6-
on:
7-
push:
8-
branches: [ main ]
9-
pull_request:
10-
branches: [ main ]
3+
on: [push]
114

125
jobs:
13-
build:
6+
- uses: actions/upload-artifact@master
7+
needs: build
8+
name: webpack artifacts
9+
path: public/
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: npm install and build webpack
16+
run: |
17+
npm install
18+
npm run build
19+
20+
test:
1421

1522
runs-on: ubuntu-latest
1623

1724
strategy:
1825
matrix:
19-
node-version: [10.x, 12.x, 14.x, 15.x]
20-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
26+
os: [ubuntu-latest, windows-2016]
27+
node-version: [12.x, 14.x]
2128

2229
steps:
2330
- uses: actions/checkout@v2
2431
- name: Use Node.js ${{ matrix.node-version }}
2532
uses: actions/setup-node@v1
2633
with:
2734
node-version: ${{ matrix.node-version }}
28-
- run: npm ci
29-
- run: npm run build --if-present
30-
- run: npm test
35+
- name: npm install, and test
36+
run: |
37+
npm install
38+
npm test
39+
env:
40+
CI: true

0 commit comments

Comments
 (0)