Skip to content

Commit 10dd07a

Browse files
authored
Merge pull request #692 from Zeitsperre/CI-and-Documentation
Reconfigure CI and Documentation
2 parents 31bf412 + 758ba18 commit 10dd07a

File tree

3 files changed

+70
-12
lines changed

3 files changed

+70
-12
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build ⚙️
1+
name: Build PyWPS ⚙️
22

33
on:
44
push:
@@ -7,7 +7,28 @@ on:
77
pull_request:
88

99
jobs:
10+
lint:
11+
name: Linting Suite
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Cancel previous runs
15+
uses: styfle/[email protected]
16+
with:
17+
access_token: ${{ github.token }}
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.9"
22+
- name: Install tox
23+
run: |
24+
pip install tox>=4.0
25+
- name: Run linting suite ⚙️
26+
run: |
27+
tox -e lint
28+
1029
test:
30+
name: Testing with Python${{ matrix.python-version }}
31+
needs: lint
1132
runs-on: ubuntu-latest
1233
strategy:
1334
matrix:
@@ -21,20 +42,15 @@ jobs:
2142
- tox-env: py311-extra
2243
python-version: "3.11"
2344
steps:
24-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
2546
- name: Install packages 📦
2647
run: |
2748
sudo apt-get update
2849
sudo apt-get -y install libnetcdf-dev libhdf5-dev
29-
- uses: actions/setup-python@v4
50+
- uses: actions/setup-python@v5
3051
name: Setup Python ${{ matrix.python-version }}
3152
with:
3253
python-version: ${{ matrix.python-version }}
33-
- name: Run flake8 ⚙️
34-
run: |
35-
pip install flake8
36-
flake8 pywps
37-
if: matrix.python-version == 3.8
3854
- name: Install tox 📦
3955
run: pip install "tox>=4.0"
4056
- name: Run tests with tox ⚙️
@@ -44,14 +60,16 @@ jobs:
4460
uses: AndreMiras/coveralls-python-action@develop
4561

4662
docs:
63+
name: Build docs 🏗️
64+
needs: lint
4765
runs-on: ubuntu-latest
4866
steps:
49-
- uses: actions/checkout@v3
50-
- uses: actions/setup-python@v4
67+
- uses: actions/checkout@v4
68+
- uses: actions/setup-python@v5
5169
name: Setup Python 3.8
5270
with:
5371
python-version: 3.8
54-
- name: Build docs 🏗️
72+
- name: Build documentation 🏗️
5573
run: |
5674
pip install -e .[dev]
5775
cd docs && make html

.readthedocs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Make additional formats available for download
9+
formats:
10+
- pdf
11+
- epub
12+
13+
# Set the version of Python and other tools you might need
14+
build:
15+
os: ubuntu-22.04
16+
tools:
17+
python: "mambaforge-22.9"
18+
19+
# Build documentation in the docs/ directory with Sphinx
20+
sphinx:
21+
configuration: docs/conf.py
22+
23+
# We recommend specifying your dependencies to enable reproducible builds:
24+
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
25+
python:
26+
install:
27+
- method: pip
28+
path: .
29+
extra_requirements:
30+
- dev

tox.ini

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
[tox]
22
min_version = 4.0
3-
envlist = py{37,38,39,310,311}{-extra,}
3+
envlist =
4+
py{37,38,39,310,311}{-extra,},
5+
lint
46
requires = pip >= 20.0
57
opts = --verbose
68

9+
[testenv:lint]
10+
skip_install = true
11+
extras =
12+
deps =
13+
flake8
14+
commands =
15+
flake8 pywps
16+
717
[testenv]
818
setenv =
919
PYTEST_ADDOPTS = "--color=yes"

0 commit comments

Comments
 (0)