Skip to content

Development PyPI

Development PyPI #94

Workflow file for this run

name: Development PyPI
on:
push:
tags:
- "*-*"
jobs:
testing-deploy:
name: PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/enma
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pip-tools
pip install hatch pytest pytest-cov
pip-compile pyproject.toml -o requirements-build.txt --all-extras
pip install -r requirements-build.txt
- name: Run tests
run: |
ENMA_CACHING_STATE=disabled hatch run pytest
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: pytest
- name: Build the package
run: |
hatch build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.DEV_PYPI_API_TOKEN }}
packages-dir: dist/
verify-metadata: false
attestations: false
verbose: true