Enable attestation support for PyPI publishing and add OpenSSF Scorecard workflow #199
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python tests | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
python: | |
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@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up uv | |
# Install a specific uv version using the installer | |
run: | | |
curl -LsSf https://astral.sh/uv/0.3.4/install.sh | sh | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Linting | |
run: | | |
uv run mypy itscalledsoccer | |
uv run ruff check itscalledsoccer | |
- name: Run Pytest and generate coverage file | |
run: | | |
uv run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=itscalledsoccer tests/ | tee pytest-coverage.txt | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |