-
Notifications
You must be signed in to change notification settings - Fork 10
80 lines (75 loc) · 2.52 KB
/
node.js.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# 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: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- library: 'puppeteer'
version: '2'
- library: 'puppeteer'
version: '3'
- library: 'puppeteer'
version: '4'
- library: 'puppeteer'
version: '5'
- library: 'puppeteer'
version: '6'
- library: 'puppeteer'
version: '7'
- library: 'puppeteer'
version: '8'
- library: 'puppeteer'
version: '9'
- library: 'puppeteer'
version: '10'
- library: 'playwright'
version: '1.10'
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install
run: |
npm ci
npm install ${{matrix.library}}@${{matrix.version}}
- name: Build
run: npm run build
- name: Run tests
env:
TEST_LIBRARY: ${{matrix.library}}
TEST_LIBRARY_VERSION: ${{matrix.version}}
run: npm test
release:
name: Release
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release