Skip to content

test

test #38

Workflow file for this run

name: deploy-test-pypi
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
unit-test-pytest:
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
pip install -e .[tests]
- name: Run tests with coverage
run: |
pytest --cov --cov-report=term --cov-branch
build-deploy:
needs: unit-test-pytest
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install hatch
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Build package
run: hatch build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}