Skip to content

Commit e39a10f

Browse files
committed
add gha to run pytest
1 parent 53c5792 commit e39a10f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Run basic unit tests
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: mamba-org/setup-micromamba@v1
22+
with:
23+
# the create command looks like this:
24+
micromamba-version: '2.0.2-2'
25+
environment-name: test-env
26+
create-args: >-
27+
python=${{ matrix.python-version }}
28+
gridgen
29+
numpy
30+
matplotlib
31+
pyproj
32+
pytest
33+
coverage
34+
docopt
35+
requests
36+
pyyaml
37+
init-shell: bash
38+
cache-environment: true
39+
post-cleanup: 'all'
40+
- name: Run Python tests
41+
run: python check_pygridtools.py --verbose --durations=10 --strict
42+
shell: bash -el {0}

0 commit comments

Comments
 (0)