-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (54 loc) · 1.54 KB
/
pr.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
name: Test on pull request
on:
pull_request:
branches: [master]
jobs:
lint:
name: Lint with flake8
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip flake8
- name: Lint with flake8
run: |
flake8 .
test:
name: Test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Fortran compiler on Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y gfortran
- name: Install Fortran compiler on MacOS
if: contains(matrix.os, 'macos')
run: |
brew unlink gcc && brew link gcc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
env:
# Latest setuptools enables supports pyproject.toml editable install
# ...but fails to build the extensions
SETUPTOOLS_ENABLE_FEATURES: legacy-editable
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Test with pytest
run: |
pytest -vv