Skip to content

Commit 5f178e4

Browse files
authored
Merge pull request #90 from rjleveque/pytest
WIP: Using pytest instead of nose requires renaming to regression_test.py
2 parents 9d69dcb + 1c5adda commit 5f178e4

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

.github/workflows/testing.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test Classic
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
CLAW: ${{ github.workspace }}
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.10"
23+
- name: Install dependencies
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install gfortran
27+
python -m pip install --upgrade pip
28+
pip install flake8 meson-python ninja pytest numpy
29+
30+
- name: Checkout clawpack
31+
uses: actions/[email protected]
32+
with:
33+
repository: clawpack/clawpack
34+
submodules: true
35+
- name: Checkout classic branch
36+
uses: actions/[email protected]
37+
with:
38+
repository: clawpack/classic
39+
path: classic
40+
- name: Install clawpack
41+
run: |
42+
pip install --user -e $CLAW
43+
44+
- name: Lint with flake8
45+
run: |
46+
cd ${CLAW}/geoclaw
47+
# stop the build if there are Python syntax errors or undefined names
48+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
49+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
50+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
51+
- name: Test with pytest
52+
run: |
53+
cd ${CLAW}/classic
54+
pytest

0 commit comments

Comments
 (0)