-
Notifications
You must be signed in to change notification settings - Fork 87
59 lines (43 loc) · 1.56 KB
/
pr.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
47
48
49
50
51
52
53
54
55
56
57
58
59
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: PR
on:
pull_request:
branches: [master]
push:
branches: [master]
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
npm: [8]
include:
- os: ubuntu-latest
# npm 6 and 8 have slightly different behavior with verdaccio in publishing tests.
# It's unclear if this translates to meaningful differences in behavior in actual scenarios,
# but test against both versions to be safe. (Only do this on the ubuntu build for speed.)
npm: 6
name: build (${{ matrix.os }}, npm ${{ matrix.npm }})
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install Node.js from .nvmrc
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .nvmrc
# Guarantee a predictable version of npm for the first round of tests
- name: Install npm@${{ matrix.npm }}
run: npm install --global npm@${{ matrix.npm }}
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn docs:build
- run: yarn checkchange --verbose
- run: yarn test:unit
- run: yarn test:func
- run: yarn test:e2e