Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconfigure CI and Documentation #692

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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