-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (64 loc) · 1.88 KB
/
test_with_conda.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
name: Testing With Conda
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build_and_test:
name: Testing (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: .github/environment_ci.yml
activate-environment: geoana-test
python-version: ${{ matrix.python-version }}
- name: Install numba
if: matrix.python-version != '3.13'
# Numba doesn't work on python 3.13 just yet:
run: |
conda install --yes -c conda-forge numba
# Install discretize from it's repo until wheels/conda-forge built against numpy2.0 available:
- name: Pull Discretize
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: 'simpeg/discretize'
ref: 'main'
path: 'discretize'
- name: Install discretize
run: |
pip install ./discretize
- name: Conda information
run: |
conda info
conda list
conda config --show
- name: Install Our Package
run: |
pip install --no-build-isolation --editable . --config-settings=setup-args="-Dwith_extensions=true"
- name: Run Tests
run: |
pytest tests --cov-config=.coveragerc --cov=geoana --cov-report=xml -s -v -W ignore::DeprecationWarning
- name: "Upload coverage to Codecov"
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true