-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (25 loc) · 932 Bytes
/
test.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: ci
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker image
uses: docker/build-push-action@v2
with:
load: true # This allows you to load the built image into Docker's local image store
context: .
target: test
tags: whiscy:test
- name: Run tests
run: >
docker run -v ${PWD}/coverage-report:/opt/software/whiscy/coverage-report --rm whiscy:test pytest --cov --cov-report xml:/opt/software/whiscy/coverage-report/coverage.xml --cov-append -vv --hypothesis-show-statistics
- uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage-report/coverage.xml