Repository navigation
67 lines (67 loc) · 1.81 KB
/
Copy pathci.yml
File metadata and controls
67 lines (67 loc) · 1.81 KB
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
name: main
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macOS-latest]
node: ['16', '14']
name: test/node ${{ matrix.node }}/${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: ${{ matrix.node }}
- run: npm install -g yarn
- run: yarn install
- run: yarn test
coverage:
needs: [test]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '14'
- run: npm install -g yarn
- run: yarn install
- uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: yarn run coverage
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov
debug: true
publish:
if: ${{ github.ref_name == 'master' }}
needs: [coverage]
name: publish
runs-on: ubuntu-latest
steps:
- name: checkout root
uses: actions/checkout@master
- name: use nodejs
uses: actions/setup-node@master
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: credentials
run: |
git config user.name "${{ secrets.GH_USERNAME }}"
git config user.email "${{ secrets.GH_EMAIL }}"
- name: install dev dependencies
run: npm install --ignore-scripts
- name: publish application
run: make publish
- name: push to master
run: git push
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}