-
Notifications
You must be signed in to change notification settings - Fork 51
72 lines (60 loc) · 1.76 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
# run weekly (see issue #186)
schedule:
- cron: "42 3 * * 6"
push:
branches:
- "master"
pull_request:
branches:
- "master"
concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# Only test lowest and highest version on the expensive/slow
# macOS and windows runners (UPDATE when supported versions change):
exclude:
- os: macOS-latest
python-version: 3.10
- os: macOS-latest
python-version: 3.11
- os: windows-latest
python-version: 3.10
- os: windows-latest
python-version: 3.11
steps:
- uses: actions/checkout@v3
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: mamba-org/setup-micromamba@main
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
extra-specs: |
python=${{ matrix.python-version }}
- name: Install package (with no dependencies)
run: |
python -m pip install . --no-deps
- name: Run tests
run: |
pytest -v -n 2 --black --cov=alchemlyb --cov-report=xml --color=yes src/alchemlyb/tests
env:
MPLBACKEND: agg
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
file: ./coverage.xml
fail_ci_if_error: true