forked from bump-sh/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.46 KB
/
checks.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
36
37
38
39
40
41
42
43
44
45
46
name: Developer checks
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
checks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node_version: [ '14', '16', '18' ]
architecture: [ 'x64' ]
# an extra windows-x86 run:
# include:
# - os: windows-2016
# node_version: 12
# architecture: x86
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ matrix.os }}-node-${{ matrix.node_version }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node_version }}-build-${{ env.cache-name }}-
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
- run: npm ci
- run: npm run prepack # Try to 'compile' project
- run: npm run test-coverage # Run all developer checks (lint & unit tests)
- run: npm run test-integration # Run integration tests