Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Use new create package action with attestation (forked repo action)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed May 27, 2024
1 parent 716f507 commit 8f8116d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on:
push:
branches:
- main
workflow_call:
inputs:
attest-package:
description: "Create GitHub provenance attestation for the package."
default: "false"
type: string
outputs:
artifact-name:
description: "Name of the uploaded artifact; use for artifact retrieval."
value: ${{ jobs.package.outputs.artifact-name }}

# Cancel active CI runs for a PR before starting another run
concurrency:
Expand All @@ -27,10 +37,15 @@ jobs:
tox-source: "tox"

package:
name: Python Package
uses: beeware/.github/.github/workflows/python-package-create.yml@main
name: Package gbulb
permissions:
id-token: write
contents: read
attestations: write
# uses: beeware/.github/.github/workflows/python-package-create.yml@main
uses: rmartin16/.github-beeware/.github/workflows/python-package-create.yml@hynek-build
with:
tox-source: "tox"
attest: ${{ inputs.attest-package }}

python-versions:
name: Python compatibility test
Expand All @@ -47,22 +62,38 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0

- name: Checkout beeware/.github
uses: actions/checkout@v4.1.6
with:
repository: beeware/.github
path: .github-beeware

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
- name: Get Packages
uses: actions/download-artifact@v4.1.7
with:
name: ${{ needs.package.outputs.artifact-name }}
path: dist

- name: Install System Dependencies
run: |
sudo apt update -y
sudo apt install -y pkg-config python3-dev libgirepository1.0-dev gir1.2-gtk-3.0
- name: Install Tox
working-directory: ./.github-beeware/scripts
run: |
# We don't actually want to install gbulb; we just want the dev extras
# so that we have a known version of coverage
python -m pip install -e .[dev]
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools build wheel
# Utility script installs tox as defined in pyproject.toml
python -m install_requirement tox --extra dev --project-root ${{ github.workspace }}
- name: Test
run: tox -e py
run: tox -e py --installpkg dist/gbulb-*.whl
1 change: 1 addition & 0 deletions changes/148.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``hynek/build-and-inspect-python-package`` is now used to create the Python package.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ multi_line_output = 3
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
# "error", # promote warnings to errors
"error", # promote warnings to errors
]

# need to ensure build directories aren't excluded from recursion
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ skip_install = True
passenv = FORCE_COLOR
deps =
build==1.2.1
check-wheel-contents==0.6.0
twine==5.1.0
commands =
python -m build . --outdir dist/
python -m twine check dist/*
check-wheel-contents dist{/}

0 comments on commit 8f8116d

Please sign in to comment.