-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (40 loc) · 1.05 KB
/
unit-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
40
41
42
43
name: "Unit tests"
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
schedule:
# Weekly on saturday 23:59
- cron: "59 23 * * 6"
jobs:
test_suite:
runs-on: [self-hosted, linux, x64, gpu]
container:
image: continuumio/miniconda3
options: --runtime=nvidia --gpus all
steps:
- name: Pull code
uses: actions/checkout@v4
- name: Install dependencies
run: |
conda install -y -c conda-forge python=3 cupy cuda-version=11.8
python -m pip install coverage
- name: Install code and list dependencies
run: |
python -m pip install -e .[plotting]
conda list
- name: Run tests and generate coverage
run: |
coverage run -m unittest discover tests/
coverage xml
echo ${{ github.event.number }} > coverage.PR
- name: upload coverage report
uses: actions/upload-artifact@v4
with:
path: coverage.*
name: coverage