Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Remove scheduled runs #32

Remove scheduled runs

Remove scheduled runs #32

Workflow file for this run

name: CI
on:
push:
branches:
- main
- release
pull_request:
jobs:
formatting:
name: Formatting and static analysis
runs-on: 'ubuntu-22.04'
outputs:
min_python: ${{ steps.vars.outputs.min_python }}
min_tox_env: ${{ steps.vars.outputs.min_tox_env }}
steps:
- uses: actions/checkout@v4
- name: Get Python version for other CI jobs
id: vars
run: |
echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- uses: pre-commit/[email protected]
with:
extra_args: --all-files
- uses: pre-commit-ci/[email protected]
if: always()
with:
msg: Apply automatic formatting
type-checking:
name: Type checking
needs: formatting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e mypy
tests:
name: Tests
needs: formatting
strategy:
matrix:
os: ['ubuntu-22.04']
python:
- version: '${{needs.formatting.outputs.min_python}}'
tox-env: '${{needs.formatting.outputs.min_tox_env}}'
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit
docs:
needs: tests
uses: ./.github/workflows/docs.yml
with:
publish: false
linkcheck: ${{ github.ref == 'refs/heads/main' }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
secrets: inherit