-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 1003 Bytes
/
tests.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
name: Running tests
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write # Ensure write permission for contents
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.14
- name: Provision with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: AMLsim/amlsim.yml
environment-name: amlsim
cache-downloads: true
- name: Run tests with pytest
shell: bash -l {0}
run: |
cd AMLsim
set -e
micromamba activate amlsim
micromamba install pytest pytest-cov
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=amlsim ./tests/ | tee pytest-coverage.txt
cat ./pytest-coverage.txt