Skip to content

[GTI-129] Add tests (#48) #8

[GTI-129] Add tests (#48)

[GTI-129] Add tests (#48) #8

Workflow file for this run

name: Pull Request Checks
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install black
run: |
python -m pip install --upgrade pip
pip install black>=25.1.0
- name: Check code formatting with black
run: |
black --check --diff *.py
- name: Check if black would make changes
if: failure()
run: |
echo "Code formatting issues found. Run 'black *.py' to fix."
exit 1
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run all tests with pytest
run: |
pytest -v --tb=short