-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (41 loc) · 1.21 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
# Upon a push to main, this workflow will:
# -- install pyRT_DISORT
# -- run all tests
# -- run a linter
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test-mars_time:
name: "Test pyRT_DISORT on ${{ matrix.os }} using Python ${{ matrix.python-version }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13]
python-version: ["3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup GNU Fortran
uses: modflowpy/install-gfortran-action@v1
- name: Install pyRT_DISORT and testing utilities
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Ensure DISORT is importable
run: |
python ci_test.py
- name: Test with pytest
run: |
python -m pytest pyrt
- name: Lint with pylint
run: |
python -m pylint --exit-zero pyrt