-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (33 loc) · 983 Bytes
/
test.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
name: Build and Test
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Test
run: yarn test:ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/coverage-final.json
flags: unittests
- name: Publish
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
yarn publish:ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}