1
0
Fork 0
operator-repo/.github/workflows/tox.yaml

56 lines
1.2 KiB
YAML

name: Run tox
on:
push:
paths-ignore:
- README.md
- .pre-commit-config.yaml
- .gitignore
pull_request:
paths-ignore:
- README.md
- .pre-commit-config.yaml
- .gitignore
jobs:
lint:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
- name: Install dependencies
run: pdm install -d -G lint -G test
- name: Run autoflake check
run: pdm run tox -e autoflake
- name: Run isort check
run: pdm run tox -e isort
- name: Run black check
run: pdm run tox -e black
- name: Run pylint
run: pdm run tox -e pylint
- name: Run mypy
run: pdm run tox -e mypy
- name: Run bandit
run: pdm run tox -e bandit
unit-tests:
name: Unit tests
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pdm install -d -G test
- name: Run unit tests
run: pdm run tox