-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.48 KB
/
ci.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
name: CI
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache_node_modules
with:
path: node_modules
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
node_modules-${{ runner.os }}-
node_modules-
- uses: actions/cache@v3
if: steps.cache_node_modules.outputs.cache-hit != 'true'
with:
path: /usr/local/share/.cache/yarn/v6
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
yarn-
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn setup
- run: yarn test
- uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.info
release:
if: github.event_name == 'push' && contains('refs/heads/main,refs/heads/beta,refs/heads/alpha', github.ref)
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
node_modules-${{ runner.os }}-
node_modules-
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: ph-fritsche/action-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}