Skip to content

Reduce errors in successful tests #443

Reduce errors in successful tests

Reduce errors in successful tests #443

Workflow file for this run

name: Release
on:
push:
branches:
- main
tags:
- '*.*.*'
pull_request:
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v5
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.1
with:
environments: release
- name: Ensure tag matches version
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: |
version="$(pixi exec -s go-yq -- yq .project.version pyproject.toml)"
tag="${{ github.ref_name }}"
if [ "$version" != "$tag" ]; then
echo "Tag $tag does not match version $version"
exit 1
fi
- name: Build
run: pixi run -e release hatch build
- name: Check build
run: pixi run -e release twine check dist/*
- name: Check install
shell: pixi exec -s python -s pip -- bash -e {0}
run: |
pip install dist/*.whl
python -c "from pydiverse.pipedag import *"
pip check
- name: List files
run: ls -l dist/
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: artifact
path: dist/*
release:
name: Publish Package
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
environment: pypi
steps:
- uses: actions/download-artifact@v5
with:
name: artifact
path: dist
- name: Publish package on PyPi
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
# the twine version in the container is outdated
# and results in a false positive
verify-metadata: false