Switch to async subprocess when calling podman #597
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
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build | |
on: [push, pull_request] | |
jobs: | |
# https://github.com/pre-commit/action | |
pre-commit: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/action@v3.0.1 | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: dev-requirements.txt | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: | | |
python -m pip install -r dev-requirements.txt | |
npm install -g configurable-http-proxy | |
- name: Update setuptools_scm version | |
run: python setup.py build | |
- name: Run tests | |
run: pytest tests -v | |
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
publish-pypi: | |
name: Pypi | |
needs: | |
# Only publish if other jobs passed | |
- pre-commit | |
- test | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: dev-requirements.txt | |
- name: Install pypa/build | |
run: python -m pip install build | |
- name: Build a binary wheel and a source tarball | |
run: python -m build --sdist --wheel --outdir dist/ | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@v1.8.14 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |