-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (46 loc) · 1.49 KB
/
run_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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: run_tests
on: [push, pull_request]
jobs:
run_pytest:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout git repository
uses: actions/checkout@v4
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: cedalion
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Conda env
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment_dev.yml has not changed
CACHE_NUMBER: 0
id: cache
- name: Update environment
run: conda env update -n cedalion -f environment_dev.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Install cedalion
run: python -m pip install -e . --no-deps --force-reinstall
- name: Install nirfaster
run: bash install_nirfaster.sh CPU
shell: bash
- name: Running Tests
run: python -m pytest --verbose