forked from aickin/shrink-ray
-
Notifications
You must be signed in to change notification settings - Fork 16
86 lines (85 loc) · 2.27 KB
/
core.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
81
82
83
84
85
86
name: Core
on:
- push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node:
- 14.x
- 12.x
- 10.x
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- uses: actions/setup-node@v1
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Install deps
run: npm install
- name: Test
run: npm test
- name: Upload coverage
if: ${{ matrix.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node }}-on-${{ matrix.os }}
parallel: true
posttest:
runs-on: ubuntu-latest
needs: test
continue-on-error: true
steps:
- name: Finalise coverage report
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
release:
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/master' }}
needs: test
strategy:
matrix:
os:
- ubuntu-latest
node:
- 14.x
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- uses: actions/setup-node@v1
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Install deps
run: npm install
- name: Release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}