Skip to content

Split extra libraries and add more granular control over tests #371

Split extra libraries and add more granular control over tests

Split extra libraries and add more granular control over tests #371

Workflow file for this run

name: Build PyWPS ⚙️
on:
push:
branches:
- main
pull_request:
concurrency:
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch except on main.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
name: Linting Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install tox
run: |
pip install tox>=4.30.3
- name: Run linting suite ⚙️
run: |
tox -e lint
test:
name: Testing with Python${{ matrix.python-version }}
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v6
- name: Install packages 📦
run: |
sudo apt-get update
sudo apt-get -y install libnetcdf-dev libhdf5-dev
- uses: actions/setup-python@v6
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install tox 📦
run: pip install "tox>=4.30.3" "tox-gh>=1.5"
- name: Run tests with tox ⚙️
run: |
tox
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
- name: Report Coverage
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ matrix.python-version }}
parallel: true
docs:
name: Build docs 🏗️
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
name: Setup Python 3.10
with:
python-version: "3.10"
- name: Build documentation 🏗️
run: |
pip install -e .[dev]
cd docs && make html
finish:
name: Finish
needs:
- test
- docs
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true