Skip to content

Make use of Hatch environments #21

Make use of Hatch environments

Make use of Hatch environments #21

Workflow file for this run

name: Python Package Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["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 }}
- name: Install Hatch
uses: pypa/hatch@install
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip # This path is specific to Ubuntu
# Check for a cache hit for the corresponding dev requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Generate example project
run: |
cookiecutter --no-input . package_name=example
- name: Check example project
run: |
cd example
make help
make style
make check-style
make check-static-analysis
make test
make test-verbose
make coverage
make check-docs
make docs
make dist
make dist-test