Skip to content

Commit

Permalink
Merge pull request #692 from Zeitsperre/CI-and-Documentation
Browse files Browse the repository at this point in the history
Reconfigure CI and Documentation
  • Loading branch information
Zeitsperre committed Jan 5, 2024
2 parents 31bf412 + 758ba18 commit 10dd07a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 12 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build ⚙️
name: Build PyWPS ⚙️

on:
push:
Expand All @@ -7,7 +7,28 @@ on:
pull_request:

jobs:
lint:
name: Linting Suite
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install tox
run: |
pip install tox>=4.0
- name: Run linting suite ⚙️
run: |
tox -e lint
test:
name: Testing with Python${{ matrix.python-version }}
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -21,20 +42,15 @@ jobs:
- tox-env: py311-extra
python-version: "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install packages 📦
run: |
sudo apt-get update
sudo apt-get -y install libnetcdf-dev libhdf5-dev
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Run flake8 ⚙️
run: |
pip install flake8
flake8 pywps
if: matrix.python-version == 3.8
- name: Install tox 📦
run: pip install "tox>=4.0"
- name: Run tests with tox ⚙️
Expand All @@ -44,14 +60,16 @@ jobs:
uses: AndreMiras/coveralls-python-action@develop

docs:
name: Build docs 🏗️
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Setup Python 3.8
with:
python-version: 3.8
- name: Build docs 🏗️
- name: Build documentation 🏗️
run: |
pip install -e .[dev]
cd docs && make html
30 changes: 30 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Make additional formats available for download
formats:
- pdf
- epub

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "mambaforge-22.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- dev
12 changes: 11 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
[tox]
min_version = 4.0
envlist = py{37,38,39,310,311}{-extra,}
envlist =
py{37,38,39,310,311}{-extra,},
lint
requires = pip >= 20.0
opts = --verbose

[testenv:lint]
skip_install = true
extras =
deps =
flake8
commands =
flake8 pywps

[testenv]
setenv =
PYTEST_ADDOPTS = "--color=yes"
Expand Down

0 comments on commit 10dd07a

Please sign in to comment.