-
Notifications
You must be signed in to change notification settings - Fork 55
52 lines (48 loc) · 1.37 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
name: Build
on:
push:
branches: [main,release,develop]
pull_request:
branches: [main,release,develop]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com/
scope: '@benddao'
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_PACKAGES_REGISTRY_READ_ONLY }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup yarn
run: npm install -g yarn
- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v2
with:
node-version: "16"
cache: yarn
- name: Install dependencies
run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_PACKAGES_REGISTRY_READ_ONLY }}
- name: Test
run: npm run ci:test
- name: Coverage
run: npm run dev:coverage
- name: Publish coverage
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}