fix(test): fix typo/braino in test #11
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: | |
branches: ['*'] | |
tags: ['v[0-9]+.[0-9]+.[0-9]+*'] | |
pull_request: | |
branches: ['master'] | |
workflow_dispatch: | |
jobs: | |
tox-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: python -m pip install --upgrade pip | |
- run: pip install tox tox-gh-actions | |
- run: tox | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-data | |
path: .coverage.* | |
retention-days: 1 | |
coverage: | |
name: Coverage Report | |
needs: tox-tests | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: python -m pip install --upgrade pip | |
- run: pip install coverage[toml] | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-data | |
- name: Test coverage | |
run: | | |
coverage combine | |
coverage report --fail-under=100 --show-missing | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pre-commit | |
~/.cache/pip | |
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
- run: python -m pip install --upgrade pip | |
- run: pip install pre-commit | |
- run: pre-commit run -a | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
- run: pdm install | |
- run: pdm run mypy | |
publish-to-pypi: | |
needs: [coverage, pre-commit, mypy] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
environment: | |
name: pypi | |
url: https://pypi.org/p/lektor-index-pages/ | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: pdm-project/setup-pdm@v3 | |
- run: pdm publish |