-
Notifications
You must be signed in to change notification settings - Fork 70
38 lines (36 loc) · 1.08 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Set branch name
run: echo >>$GITHUB_ENV BRANCH_NAME=${GITHUB_REF#refs/heads/}
- name: Echo branch name
run: echo ${BRANCH_NAME}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Check Branch
id: check-branch
run: |
if [[ ${{ env.BRANCH_NAME }} =~ ^(master|release-next)$|^hotfix\/* ]]; then
echo ::set-output name=match::true
fi
- run: npm run setup
- run: npm run dependency:check
- run: npm run lint
- run: npm run test
- if: steps.check-branch.outputs.match == 'true'
run: npm run version:check
- run: npm run coverage
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }}
CI: true