-
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 982 Bytes
/
build.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 & Publish
on:
push:
branches:
- master
pull_request:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
- name: Cache ✨
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ runner.os }}-cache-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-cache-
- name: install dependencies
run: npm install
- name: test
run: npm run test:cov
- name: Publish coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }}
- uses: kanekotic/merge-release@master
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}