Rewrite installation section #80
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
--- | |
# vim: ft=yaml ts=2 sw=2 et | |
name: PostQF project workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
python-build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests with coverage | |
run: make -C tests coverage | |
- if: github.event.ref_type == 'tag' | |
name: Build Python artifacts | |
run: make dist | |
- if: github.event.ref_type == 'tag' | |
name: Store Python artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-artifacts | |
path: dist/* | |
pypi-testrepo: | |
if: github.event.ref_type == 'tag' && contains(github.ref_name, '.dev') | |
name: Publish to PyPI | |
needs: python-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Retrieve pre-built Python artifacts | |
uses: actions/download-artifact@v4 | |
- name: Prepare dist directory | |
run: mv python-artifacts dist | |
- name: Publish to PyPI test repository | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN_TESTREPO }} | |
repository_url: https://test.pypi.org/legacy/ | |
verbose: true |