Skip to content

Commit f0bb273

Browse files
authored
Merge pull request #33 from wx4stg/master
automated tests and test coverage checking
2 parents 5619678 + b95b476 commit f0bb273

76 files changed

Lines changed: 616 additions & 13 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
30+
eval "$(micromamba shell hook --shell bash)"
31+
micromamba activate base
32+
micromamba install pytest-cov pytest-mpl xarray netcdf4 pandas numpy scikit-learn scipy pyproj cartopy metpy ipywidgets python=${{ matrix.python-version }} -c conda-forge
33+
python -m pip install .
34+
- name: Test with pytest
35+
run: |
36+
eval "$(micromamba shell hook --shell bash)"
37+
micromamba activate base
38+
coverage run --source=pyxlma -m pytest --mpl --mpl-baseline-path=tests/truth/images/ --mpl-generate-summary=html,json --mpl-results-path=tests/mpl-results/ tests/
39+
coverage xml
40+
- name: Upload coverage reports to Codecov
41+
uses: codecov/codecov-action@v3
42+
env:
43+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
44+
- name: Upload matplotlib test results
45+
if: always()
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: matplotlib-results
49+
path: tests/mpl-results/

README.md

Lines changed: 32 additions & 0 deletions
5.31 KB
Binary file not shown.
19.3 KB
Binary file not shown.
1.04 KB
Binary file not shown.
1.42 KB
Binary file not shown.
16.9 KB
Binary file not shown.
27.6 KB
Binary file not shown.
5.7 KB
Binary file not shown.
1.26 KB
Binary file not shown.

0 commit comments

Comments
 (0)