-
Notifications
You must be signed in to change notification settings - Fork 37
35 lines (31 loc) · 835 Bytes
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm run build --if-present
- run: git status --porcelain dist/setup.js
- name: check dist build
run: |
if ! git diff --quiet --exit-code dist/setup.js; then
echo "::error run 'npm run build' and commit the dist/setup.js file"
exit 1
fi
- uses: codecov/codecov-action@v3