Skip to content

chore/ci: setup reviewdog #2060

chore/ci: setup reviewdog

chore/ci: setup reviewdog #2060

Workflow file for this run

name: Check tox tests, lint and types
on:
push:
branches:
- master
- releases/*
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
check_document:
name: Check packaging 📦
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 20
fetch-tags: true
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Install tools
run: |
pip install -U pip
pip install tox tox-gh-actions coveralls coverage[toml]
- name: Lint checks
run: |
tox -e check | reviewdog -f flake8 -reporter=github-pr-review -fail-level=error
tox -e mypy | reviewdog -f mypy -reporter=github-pr-review -fail-level=error
tox -e docs
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: tox -e py312
env:
PYTEST_ADDOPTS: --cov-config=pyproject.toml --cov --cov-append --verbose
- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}