forked from Multiwoven/multiwoven
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.08 KB
/
ui-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
name: frontend-ci
on:
push:
branches: [main]
paths:
- "ui/**"
pull_request:
paths:
- "ui/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
- name: Install dependencies
run: npm install
working-directory: ./ui
- name: Run tests and collect coverage
run: npm test -- --coverage
working-directory: ./ui
- name: Upload coverage to Code Climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID_UI }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
if [ -f coverage/lcov.info ]; then
./cc-test-reporter after-build --exit-code $? --coverage-input-type lcov
else
echo "Coverage report not found."
fi
working-directory: ./ui