Skip to content

[pre-commit.ci] pre-commit autoupdate #228

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #228

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and test environment
run: |
pip3 install poetry
poetry install --with dev
- name: Run pre-commit
uses: pre-commit/action@main
- name: Run pytest
run: poetry run pytest -n auto -m "not download"
- name: Archive coverage svg
uses: actions/upload-artifact@v3
with:
name: coverage-badge
path: docs/img/coverage.svg
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Download coverage svg
uses: actions/download-artifact@v3
with:
name: coverage-badge
path: docs/img/
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
run: |
pip3 install poetry
poetry install --with dev
- name: Deploy mkdocs
run: poetry run mkdocs gh-deploy --force
- name: Update pre-commit
uses: pre-commit-ci/[email protected]
if: always()