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

56 lines
1.2 KiB
YAML
Raw Normal View History

2023-08-18 17:41:54 +00:00
name: Run tox
on:
2023-08-18 18:11:38 +00:00
push:
paths-ignore:
- README.md
- .pre-commit-config.yaml
- .gitignore
pull_request:
paths-ignore:
- README.md
- .pre-commit-config.yaml
- .gitignore
2023-08-18 17:41:54 +00:00
jobs:
2023-08-19 09:26:58 +00:00
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
2023-08-19 11:33:32 +00:00
- 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
2023-08-19 09:26:58 +00:00
unit-tests:
name: Unit tests
needs: lint
2023-08-18 17:41:54 +00:00
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up PDM
2023-08-18 18:22:06 +00:00
uses: pdm-project/setup-pdm@v3
2023-08-18 17:41:54 +00:00
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
2023-08-19 09:26:58 +00:00
run: pdm install -d -G test
2023-08-19 11:33:32 +00:00
- name: Run unit tests
2023-08-18 17:41:54 +00:00
run: pdm run tox