| 1 |
# This workflow will install Python dependencies, run tests and lint with a single version of Python |
| 2 |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
| 3 |
|
| 4 |
name: Run Tests |
| 5 |
|
| 6 |
on: |
| 7 |
push: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
pull_request: |
| 11 |
branches: |
| 12 |
- master |
| 13 |
|
| 14 |
jobs: |
| 15 |
build: |
| 16 |
runs-on: ubuntu-latest |
| 17 |
steps: |
| 18 |
- uses: actions/[email protected] |
| 19 |
- name: Set up Python 3.12 |
| 20 |
uses: actions/[email protected] |
| 21 |
with: |
| 22 |
python-version: 3.12 |
| 23 |
- name: Install dependencies |
| 24 |
run: | |
| 25 |
pip install -r requirements-test.txt |
| 26 |
- name: Lint with flake8 |
| 27 |
run: | |
| 28 |
flake8 pyhomeworks |
| 29 |
- name: Check formatting with black |
| 30 |
run: | |
| 31 |
black pyhomeworks --check --diff |
| 32 |
- name: Lint with mypy |
| 33 |
run: | |
| 34 |
mypy --strict pyhomeworks |
| 35 |
- name: Lint with pylint |
| 36 |
run: | |
| 37 |
pylint pyhomeworks |