-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (29 loc) · 1004 Bytes
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# GitHub actions workflow for testing pylint-silent.
name: run tests
# Triggers the workflow on push or pull-request events.
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
# Run on earliest and latest supported python versions.
python-version: ["3.8", "3.12"]
# Run linters and pytests.
testsuite: ["linters", "pytest"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install pip and tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: run linters
# Linters are only run on the earliest supported python version.
if: ${{ matrix.python-version == '3.8' && matrix.testsuite == 'linters' }}
run: tox -e mypy,pep8,pylint,ruff
- name: run pytest
if: ${{ matrix.testsuite == 'pytest' }}
run: tox -e py3-pytest