| 1 |
name: CI |
| 2 |
on: [push, pull_request] |
| 3 |
jobs: |
| 4 |
build-linux: |
| 5 |
name: Python (${{ matrix.python-version }}) |
| 6 |
runs-on: ubuntu-latest |
| 7 |
strategy: |
| 8 |
matrix: |
| 9 |
python-version: |
| 10 |
- '3.10' |
| 11 |
- '3.11' |
| 12 |
- '3.12' |
| 13 |
- '3.13' |
| 14 |
- '3.14' |
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v6 |
| 17 |
- uses: actions/setup-python@v6 |
| 18 |
with: |
| 19 |
python-version: ${{ matrix.python-version }} |
| 20 |
- name: Install Package |
| 21 |
run: | |
| 22 |
python -m pip install .[tests] |
| 23 |
- name: Run Tests |
| 24 |
run: | |
| 25 |
if [[ ${{ matrix.python-version }} == "3.14" ]]; then |
| 26 |
# For one of the python versions, check code coverage during pytest |
| 27 |
pip install .[codecov] |
| 28 |
python -m pytest --cov metar |
| 29 |
codecov |
| 30 |
else |
| 31 |
# For all other python versions, just run pytest |
| 32 |
python -m pytest |
| 33 |
fi |
| 34 |
|
| 35 |
typing: |
| 36 |
name: Typing Check |
| 37 |
runs-on: ubuntu-latest |
| 38 |
strategy: |
| 39 |
matrix: |
| 40 |
|
| 41 |
python-version: ["3.13"] |
| 42 |
steps: |
| 43 |
- uses: actions/checkout@v6 |
| 44 |
- uses: actions/setup-python@v6 |
| 45 |
with: |
| 46 |
python-version: ${{ matrix.python-version }} |
| 47 |
- name: Install dependencies |
| 48 |
run: python -m pip install .[typing] |
| 49 |
- name: Run mypy |
| 50 |
run: mypy metar |