-
Notifications
You must be signed in to change notification settings - Fork 190
50 lines (42 loc) · 1.28 KB
/
workflow.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
45
46
47
48
49
50
name: Build and Run Unit Test Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Build environment
run: |
chmod +x ghostwriter-cli-linux
./ghostwriter-cli-linux install --dev
- name: Generate Coverage report
run: |
docker-compose -f local.yml run django coverage run manage.py test --exclude-tag=GitHub
docker-compose -f local.yml run django coverage xml -o "coverage/reports/coverage.xml"
- name: Upload Coverage report artifact
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage/reports/coverage.xml
upload-coverage-report:
needs: run-unit-tests
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-ghostwriter
fail_ci_if_error: true
verbose: true