Skip to content

[pre-commit.ci] pre-commit autoupdate (#160) #414

[pre-commit.ci] pre-commit autoupdate (#160)

[pre-commit.ci] pre-commit autoupdate (#160) #414

name: iniabu-tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
MAIN_PYTHON_VERSION: "3.13"
jobs:
# Build and test
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest
- name: Run Lint on one python
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
run: uv run ruff check
- name: Run Pytest with coverage
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
run: |
uv run pytest --cov=iniabu --cov-report xml
- name: Upload coverage reports to Codecov
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION && github.repository_owner == 'galactic-forensics' }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}