-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (53 loc) · 1.25 KB
/
pr_tests.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
name: PR tests
on:
pull_request:
branches:
- main
tags:
- "*"
push:
branches:
- main
tags:
- "*"
env:
CONDA: /local/tmp/kbmod-runner/miniconda3
jobs:
test-fiducial:
name: Testing in kbmod_ci env.
runs-on: self-hosted
strategy:
fail-fast: true
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- name: Setup environment
run: echo "/usr/local/cuda-12/bin" > $GITHUB_PATH
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v2.2.0
with:
activate-environment: kbmod_ci_clone
- name: Clone existing environment
run: |
conda deactivate
conda create --name kbmod_ci_clone --clone kbmod_ci
conda activate kbmod_ci_clone
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
# Run linters before attempting to compile and install
# the package, faster fails.
- name: Linter
uses: psf/black@stable
with:
jupyter: true
- name: Build KBMOD
run: |
python -m pip install .
- name: Run tests
run: |
cd tests
python -m unittest -b
cd ..