Skip to content

CI

CI #7

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
# Run every sunday
- cron: '0 0 * * 0'
jobs:
########
# Test #
########
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox tox-gh-actions
- run: tox
############
# Coverage #
############
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/checkout@v2
- run: pip install coverage setuptools
- run: python setup.py install
- run: coverage run runtests.py
- run: coverage xml
- name: Coverage monitor
uses: 5monkeys/cobertura-action@master
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
path: coverage.xml
minimum_coverage: 50
#########
# Black #
#########
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install black==19.10b0 click==8.0.4
- run: black --safe --check --diff .
##########
# Flake8 #
##########
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install flake8==3.3.0
- run: flake8 --config=.flake8 .
##########
# isort #
##########
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- run: python -m pip install isort[pyproject]==4.3.21
- run: isort -rc --check-only .