This repository was archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.41 KB
/
ci.yml
File metadata and controls
45 lines (37 loc) · 1.41 KB
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
name: Continuous Integration
on:
pull_request:
branches:
- master
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20 # Add this line here
strategy:
matrix:
node-version: [ 16.x ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install requirements
run: npm install | pip3 install -r requirements.txt
- name: Run tests & coverage
run: npm run coverage
env:
CI: true
- name: Upload to CodeClimate
env:
CC_TEST_REPORTER_ID: 197bd3ea34503bd3f3b767813ef33137c182c8b524f90b1611ce03a46c18791e
run: |
export GIT_BRANCH="master"
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter format-coverage ./coverage/clover.xml -t clover --output "coverage/frontend.json"
./cc-test-reporter format-coverage ./coverage.xml -t coverage.py --output "coverage/backend.json"
./cc-test-reporter sum-coverage --output - --parts 2 coverage/frontend.json coverage/backend.json > "coverage/codeclimate.json"
./cc-test-reporter upload-coverage --id $CC_TEST_REPORTER_ID