Skip to content

Commit

Permalink
Added github workflow actions.
Browse files Browse the repository at this point in the history
Triggers the workflow on push or pull-request events.

Do not use pip caching since it looks for a requirement.txt file that does
not exist.
  • Loading branch information
udifuchs committed Feb 5, 2024
1 parent f66a6f1 commit 4404701
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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.7", "3.11"]
# 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.7' && matrix.testsuite == 'linters' }}
run: tox -e py3-pytest
- name: run pytest
if: ${{ matrix.testsuite == 'pytest' }}
run: tox -e mypy,pep8,pylint

0 comments on commit 4404701

Please sign in to comment.