-
Notifications
You must be signed in to change notification settings - Fork 13
77 lines (66 loc) · 1.74 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Run a cron job once daily
- cron: "0 0 * * *"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
name: "tests"
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos']
python-version:
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test
channel-priority: true
environment-file: devtools/conda-envs/env.yaml
use-mamba: true
miniforge-variant: Mambaforge
- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
- name: Environment Information
run: |
conda info --all
conda list
mamba --version
- name: Install package
run: |
python -m pip install -e .
- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=cinnabar --cov-report=xml --cov-report=term --color=yes cinnabar/tests/
- name: codecov
if: ${{ github.repository == 'OpenFreeEnergy/cinnabar' && github.event_name != 'schedule'}}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
verbose: true # optional (default = false)