-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (31 loc) · 1.14 KB
/
coverage.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
name: Coverage
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
coverage-job:
name: Coverage Job
runs-on: self-hosted
timeout-minutes: 30
steps:
- name: Take ownership of repo directory
run: echo ${{ secrets.SUDO_PW }} | sudo -S chown -R $USER:$USER /home/gabe/actions-runner/_work/metrinome
- name: Checkout code
uses: actions/checkout@v2
- name: Stop existing docker image
run: cd $GITHUB_WORKSPACE/src && make stop-detached || echo continuing
- name: Delete existing image
run: docker rm detached_repl || echo continuing
- name: Run new docker image
run: cd $GITHUB_WORKSPACE/src && make run-detached
- name: Execute coverage check
run: docker exec -w /app/code -e PYTHONDONTWRITEBYTECODE=1 -e MYPY_CACHE_DIR=/dev/null detached_repl make coverage
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: /home/gabe/actions-runner/_work/metrinome/metrinome/src/coverage.xml