Skip to content

Add testing and linting workflows #1

Add testing and linting workflows

Add testing and linting workflows #1

Workflow file for this run

name: Pytest and Pylint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test-and-lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest pylint
- name: Run pytest
run: python -m pytest -q
- name: Run pylint
run: pylint $(git ls-files '*.py')