chore(deps): update dependencies in lockfile #3568
Workflow file for this run
This file contains hidden or 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
| name: Test & Build | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - stable | |
| - staging | |
| tags: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - develop | |
| - stable | |
| - staging | |
| jobs: | |
| checks: | |
| name: Checks | |
| runs-on: ubuntu-latest | |
| container: fedorapython/fedora-python-tox:latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pre-commit | |
| run: | | |
| dnf install -y pre-commit git krb5-devel libpq-devel poetry python3-poetry-plugin-export | |
| - name: Mark the working directory as safe for Git | |
| run: git config --global --add safe.directory $PWD | |
| - name: Run pre-commit checks | |
| run: pre-commit run -v --all-files | |
| licenses: | |
| name: Licenses | |
| runs-on: ubuntu-latest | |
| container: fedorapython/fedora-python-tox:latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install RPM dependencies | |
| run: | | |
| dnf install -y pre-commit git krb5-devel libpq-devel poetry python3-poetry-plugin-export | |
| - name: Check licenses for datanommer.${{ matrix.package }} | |
| run: tox -e licenses | |
| working-directory: datanommer.${{ matrix.package }} | |
| strategy: | |
| matrix: | |
| package: | |
| - models | |
| - consumer | |
| - commands | |
| unit_tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| container: fedorapython/fedora-python-tox:latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install RPM dependencies | |
| run: | | |
| dnf install -y timescaledb postgresql-server pre-commit git krb5-devel libpq-devel poetry python3-poetry-plugin-export | |
| - name: Run unit tests for datanommer.${{ matrix.package }} | |
| # Don't run the tests as root or pg_ctl will refuse to start | |
| run: | | |
| chown postgres:postgres . | |
| sudo -u postgres tox -e ${{ matrix.pyver }} -- -vv | |
| working-directory: datanommer.${{ matrix.package }} | |
| strategy: | |
| matrix: | |
| pyver: | |
| - py311 | |
| - py312 | |
| package: | |
| - models | |
| - consumer | |
| - commands | |
| # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
| build: | |
| name: Build distributions 📦 | |
| runs-on: ubuntu-latest | |
| needs: | |
| - checks | |
| - licenses | |
| - unit_tests | |
| # outputs: | |
| # release-notes-models: ${{ steps.release-notes.outputs.models }} | |
| # release-notes-consumer: ${{ steps.release-notes.outputs.consumer }} | |
| # release-notes-commands: ${{ steps.release-notes.outputs.commands }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Install pypa/build | |
| run: python3 -m pip install build --user | |
| - name: Build a binary wheel and a source tarball | |
| run: | | |
| cd datanommer.${{ matrix.package }} | |
| python3 -m build | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions-${{ matrix.package }} | |
| path: datanommer.${{ matrix.package }}/dist/ | |
| if-no-files-found: error | |
| # - name: Extract changelog section | |
| # id: extract-changelog | |
| # uses: sean0x42/markdown-extract@v2 | |
| # with: | |
| # file: datanommer.${{ matrix.package }}/NEWS.md | |
| # # pattern: 'Version\s+\[${{ steps.extract-version.outputs.ESCAPED_VERSION }}\]\(.*\)' | |
| # pattern: 'Version\s+\[[[:word:].-]+\]\(.*\)' | |
| # no-print-matched-heading: true | |
| # - name: Store the release notes in the output | |
| # id: release-notes | |
| # run: | | |
| # echo '${{ matrix.package }}<<EOF' >> "$GITHUB_OUTPUT" | |
| # echo "${{ steps.extract-changelog.outputs.markdown }}" >> "$GITHUB_OUTPUT" | |
| # echo "EOF" >> "$GITHUB_OUTPUT" | |
| # - name: Show the changelog | |
| # env: | |
| # CHANGELOG: ${{ steps.extract-changelog.outputs.markdown }} | |
| # run: echo "$CHANGELOG" | |
| strategy: | |
| matrix: | |
| package: | |
| - models | |
| - consumer | |
| - commands | |
| publish-to-pypi: | |
| name: Publish to PyPI 🚀 | |
| if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc') # only publish to PyPI on final tag pushes | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/datanommer.${{ matrix.package }} | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: python-package-distributions-${{ matrix.package }} | |
| path: dist-${{ matrix.package }}/ | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist-${{ matrix.package }}/ | |
| strategy: | |
| matrix: | |
| package: | |
| - models | |
| - consumer | |
| - commands | |
| github-release: | |
| name: Create a GitHub Release 📢 | |
| needs: | |
| - publish-to-pypi | |
| - build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # IMPORTANT: mandatory for making GitHub Releases | |
| id-token: write # IMPORTANT: mandatory for sigstore | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: python-package-distributions-* | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Sign the dists with Sigstore | |
| uses: sigstore/[email protected] | |
| with: | |
| inputs: >- | |
| ./dist/*.tar.gz | |
| ./dist/*.whl | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: dist/* | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true | |
| # body: | | |
| # ## Models (datanommer.models) | |
| # ${{ needs.build.outputs.release-notes-models }} | |
| # ## Consumer (datanommer.consumer) | |
| # ${{ needs.build.outputs.release-notes-consumer }} | |
| # ## Commands (datanommer.commands) | |
| # ${{ needs.build.outputs.release-notes-commands }} |