-
Notifications
You must be signed in to change notification settings - Fork 18
34 lines (34 loc) · 1002 Bytes
/
main.yml
File metadata and controls
34 lines (34 loc) · 1002 Bytes
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
name: DataURI
on:
push:
branches:
- main
pull_request_target:
types: [assigned, opened, synchronize, reopened]
jobs:
check-package:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14', '16']
name: Check package on Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
if: ${{ github.event_name == 'pull_request_target' }}
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build and test
run: |
npm ci --prefer-offline --no-audit
npm test