-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (27 loc) · 1.2 KB
/
unittests.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
name: unittests
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: pull anaconda3:2022.10 image
run: docker pull continuumio/anaconda3:2022.10
- name: run the container
run: |
docker run --name test-anaconda-container -d -v ${{ github.workspace }}:/workspace continuumio/anaconda3:2022.10 tail -f /dev/null
- name: install system dependencies
run: |
docker exec test-anaconda-container apt-get update
docker exec test-anaconda-container apt-get install -y --no-install-recommends build-essential
- name: install python dependencies
run: |
docker exec test-anaconda-container pip install -r workspace/requirements.txt coverage pytest pytest-cov hypothesis
- name: run tests
run: |
docker exec test-anaconda-container pytest --cov --cov-report xml:workspace/coverage.xml --cov-append -vv --hypothesis-show-statistics workspace/
- uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.xml