forked from macauff/macauff
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 2.31 KB
/
smoke-test.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
# This workflow will run daily at 06:45.
# It will install Python dependencies and run tests with a variety of Python versions.
# See documentation for help debugging smoke test issues:
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit
name: Unit test smoke test
on:
schedule:
- cron: 45 6 * * *
workflow_dispatch:
jobs:
build-and-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux, Python 3.8
os: ubuntu-latest
python-version: 3.8
toxenv: py38-test
gfortran-version: 9
- name: Linux, Python 3.9
os: ubuntu-22.04
python-version: 3.9
toxenv: py39-test
gfortran-version: 11
- name: Linux, Python 3.11
os: ubuntu-22.04
python-version: "3.11"
toxenv: py311-test
gfortran-version: 11
- name: macOS, Python 3.8
os: macOS-11
python-version: 3.8
toxenv: py38-test
gfortran-version: 10
- name: macOS, Python 3.10, coverage
os: macOS-11
python-version: "3.10"
# Include at least one coverage option for codecov.
toxenv: py310-test-cov
gfortran-version: 11
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- if: runner.os == 'macOS'
name: macOS gfortran
run: |
sudo ln -s /usr/local/bin/gfortran-${{ matrix.gfortran-version }} /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@${{ matrix.gfortran-version }}/*/lib/gcc/${{ matrix.gfortran-version }} /usr/local/gfortran/lib
- if: runner.os == 'Linux'
name: ubuntu gfortran
run: sudo ln -sf /usr/bin/gfortran-${{ matrix.gfortran-version }} /usr/bin/gfortran
- name: Check gfortran version
run: gfortran --version
- name: Install dependencies
run: pip install numpy tox
- name: Run unit tests with pytest
run: |
mkdir ./.tmp
mkdir ./.tmp/${{ matrix.toxenv }}
tox -e ${{ matrix.toxenv }} -- --remote-data