Update JamesIves/github-pages-deploy-action action to v4.7.0 #2677
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
lint: | |
name: Check style (lint) | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- run: sudo rm /etc/apt/sources.list.d/*.list | |
- run: sudo apt update | |
- run: sudo apt-get install libpq-dev | |
- name: Run make lint | |
run: make lint | |
gitattributes: | |
name: Check style (git-attributes) | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- run: sudo rm /etc/apt/sources.list.d/*.list | |
- run: sudo apt update | |
- run: sudo apt-get install libpq-dev | |
- name: Run make git-attributes | |
run: make git-attributes | |
test-py: | |
name: Test Python | |
runs-on: ubuntu-24.04 | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgis/postgis | |
# Provide the password for postgres | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
matrix: | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up Python v${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- run: sudo rm /etc/apt/sources.list.d/*.list | |
- run: sudo apt update | |
- run: sudo apt-get install libpq-dev | |
- name: Run tests for Python ${{ matrix.python-version }} | |
run: make tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
files: ./coverage.core.xml,./coverage.contrib-data_sources-standard.xml,./coverage.contrib-data_sources-interlis.xml,./coverage.contrib-print_proxy-mapfish_print.xml,./coverage.contrib-stats.xml | |
flags: unittests | |
name: codecov-unittest | |
verbose: true | |
test-fed-data: | |
name: Check federal data definitions | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- run: sudo rm /etc/apt/sources.list.d/*.list | |
- run: sudo apt update | |
- run: sudo apt-get install xsltproc | |
- name: Check updates of federal data | |
run: > | |
(make check_fed_data | |
&& echo "::Notice ::The federal data definitions seem to be up to date.") | |
|| (exit_code=$?; | |
echo "::warning ::The federal data definitions seem to be out of date. Check fed.urls if the links are still valid. You may use the tools 'make update_fed_data_urls' and 'make auto_update_fed_data'."; | |
exit $exit_code) | |
doc: | |
name: Make and deploy documentation | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Make documentation | |
run: | | |
sudo rm /etc/apt/sources.list.d/*.list | |
sudo apt update | |
sudo apt-get install libpq-dev | |
make doc-html | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: doc/build/html # The folder the action should deploy. | |
build-and-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI | |
runs-on: ubuntu-24.04 | |
needs: [lint, gitattributes] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |