-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (70 loc) · 2.05 KB
/
pytest.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
78
79
80
81
name: Test
on:
push:
branches: [main]
pull_request:
branches: ['*']
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
requirements: [latest]
include:
# Test on macos and windows (first and last version of python only)
- os: macos
python-version: '3.8'
requirements: latest
- os: macos
python-version: '3.12'
requirements: latest
- os: windows
python-version: '3.8'
requirements: latest
- os: windows
python-version: '3.12'
requirements: latest
# Test on minimal requirements
- os: ubuntu
python-version: '3.8'
requirements: minimal
- os: macos
python-version: '3.8'
requirements: minimal
- os: windows
python-version: '3.8'
requirements: minimal
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
condarc-file: ci/condarc
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: ci/requirements-${{ matrix.requirements }}.yml
activate-environment: TEMPLATE
- name: Show conda options
run: conda config --show
- name: conda info
run: conda info
- name: conda list
run: conda list
- name: Install
run: python -m pip install --no-deps -e .
- name: pytest
run: py.test --verbose --cov=TEMPLATE --cov-report=xml
- name: codecov.io
uses: codecov/codecov-action@v3