-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.26 KB
/
master.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
name: Build Master on Push
on:
push:
branches:
- master
jobs:
build_master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
with:
node-version: 14.x
- name: Install dependencies
run: yarn install
- name: Build plugin
run: yarn build
- name: Build plugin for coverage
run: npx @grafana/toolkit@canary plugin:ci-build
- name: Code Climate
run: |
mkdir -p ccbin/
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./ccbin/cc-test-reporter
chmod +x ./ccbin/cc-test-reporter
yarn global add jest jest-junit
./ccbin/cc-test-reporter format-coverage -t lcov -o out/codeclimate.frontend.json coverage/lcov.info
npx jest --ci --runInBand --reporters=default --reporters=jest-junit
- name: Code Climate Upload
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./ccbin/cc-test-reporter sum-coverage out/codeclimate.*.json -d -p 1 -o out/codeclimate.total.json
./ccbin/cc-test-reporter upload-coverage -i out/codeclimate.total.json