Skip to content

58 verification (#59) #87

58 verification (#59)

58 verification (#59) #87

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
- "dev*"
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.11]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Update pip and install the package
run: |
python -m pip install --upgrade pip
python -m pip install ".[test]"
- name: Run tests
run: |
python -m pytest tests --cov=census21api --cov-fail-under=100
- name: Test documentation
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install ".[docs]"
python -m doctest README.md
python -m pytest docs \
--nbval \
--nbval-current-env \
--randomly-dont-reorganize \
--cov=census21api \
--cov-config=.docscoveragerc \
--cov-fail-under=97
- name: Install and run linters
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
run: |
python -m pip install ".[lint]"
python -m black --check .
python -m ruff .