Skip to content

Test

Test #132

Workflow file for this run

name: test
run-name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install poetry
run: pipx install poetry
- name: Cache poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-${{ matrix.python-version }}-
${{ runner.os }}-poetry-
- name: Install dependencies
run: poetry install
- name: Black
run: poetry run black --check --diff .
- name: flake8
run: poetry run flake8 .
- name: isort
run: poetry run isort --check .
- name: basedpyright
run: poetry run basedpyright .
- name: Run help
run: poetry run ctscraper --help
- name: Run tests
run: poetry run pytest