-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (59 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
71 lines (59 loc) · 2.14 KB
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
name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: [master]
jobs:
test:
name: Run tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python (Linux/macOS)
if: runner.os != 'Windows'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install gfortran (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y gfortran
- name: Install gfortran (macOS)
if: runner.os == 'macOS'
run: brew install gcc
- name: Set up conda with Python (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: ${{ matrix.python-version }}
- name: Create short temp directory (Windows)
if: runner.os == 'Windows'
run: New-Item -ItemType Directory -Force -Path C:\T | Out-Null
- name: Install gfortran + glowpython2 (Windows)
if: runner.os == 'Windows'
env:
TEMP: C:\T
TMP: C:\T
run: |
conda install -c conda-forge gfortran -y
conda run --no-capture-output pip install .[test]
conda run python -c "import glowpython2; print(glowpython2.__version__)"
- name: Install (Linux/macOS)
if: runner.os != 'Windows'
run: pip install .[test]
- name: Tests (Linux/macOS)
if: runner.os != 'Windows'
run: python -m pytest tests
- name: Tests (Windows)
# Running all tests on Windows for now...
# If the runtime starts getting too long, this can be changed to just one test
if: runner.os == 'Windows'
run: conda run --no-capture-output python -m pytest tests
# run: conda run --no-capture-output python -m pytest tests/test_no_precip.py
# ^^ If we just want to run one test