Skip to content

Adding pre commit

Adding pre commit #131

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "2.7"
env:
TOXENV: min
- python-version: "2.7"
env:
TOXENV: py
- python-version: "3.4"
env:
TOXENV: py34
# 3.5 cannot be tested in CI
# https://github.com/MatteoH2O1999/setup-python/issues/49#issuecomment-2209940822
- python-version: "3.6"
env:
TOXENV: py
- python-version: "3.7"
env:
TOXENV: py
- python-version: "3.8"
env:
TOXENV: py
- python-version: "3.9"
env:
TOXENV: py
- python-version: "3.10"
env:
TOXENV: py
- python-version: "3.10"
env:
TOXENV: mypy
- python-version: "3.11"
env:
TOXENV: py
- python-version: "3.12"
env:
TOXENV: py
- python-version: "3.12"
env:
TOXENV: pre-commit
- python-version: "3.12"
env:
TOXENV: docs
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: MatteoH2O1999/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-build: info
cache-build: true
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox codecov
- name: Run tests
env: ${{ matrix.env }}
run: tox
- name: Upload coverage.xml to codecov
uses: codecov/codecov-action@v1
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.0