Restructure release #574
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 gcc #gcc only needed until healpix releases under numpy>2 | |
python -m pip install coverage | |
- name: Install base dev code and list dependencies | |
run: | | |
python -m pip install -e .[dev] | |
conda list | |
- name: Run ruff | |
run: | | |
ruff check | |
ruff format --check | |
- name: Run tests | |
run: | | |
coverage run -m unittest discover tests/ | |
- name: Install all code and list dependencies | |
run: | | |
python -m pip install -e .[all] | |
conda list | |
- name: Run complete tests and generate coverage report | |
run: | | |
coverage run -m unittest discover tests/ | |
coverage combine | |
coverage xml | |
echo ${{ github.event.number }} > coverage.PR | |
- name: upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
path: coverage.* | |
name: coverage |