Repository navigation
feat: [DEV-16400] move CI and PyPI publishing from Harness to GitHub Actions with OIDC trusted publishing #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+440
−1,063
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
316d195
ci: replace Harness with GitHub Actions CI and PyPI trusted-publishin…
inkmugs 80136f4
ci: use the org setup-uv fork in the CI workflow
inkmugs fdbc13d
ci: use the org setup-uv fork in the release workflow
inkmugs 2f26796
docs: add a release script and a Releasing section to the README
inkmugs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master] | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: IndicoDataSolutions/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 | ||
| with: | ||
| version: "0.13.9" | ||
| require-checksums: true | ||
| - run: uvx ruff@0.17.6 format --check indico tests | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - python-version: "3.9" | ||
| tox-env: py39 | ||
| - python-version: "3.10" | ||
| tox-env: py310 | ||
| - python-version: "3.11" | ||
| tox-env: py311 | ||
| - python-version: "3.12" | ||
| tox-env: py312 | ||
| - python-version: "3.13" | ||
| tox-env: py313 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: IndicoDataSolutions/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 | ||
| with: | ||
| version: "0.13.9" | ||
| require-checksums: true | ||
| python-version: ${{ matrix.python-version }} | ||
| - run: uvx --with tox-uv tox -e ${{ matrix.tox-env }} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - '[0-9]+.[0-9]+.[0-9]+*' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: ./.github/workflows/ci.yml | ||
|
|
||
| build: | ||
| needs: ci | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - uses: IndicoDataSolutions/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 | ||
| with: | ||
| version: "0.13.9" | ||
| require-checksums: true | ||
| - run: uv build | ||
| - name: Check built version matches tag | ||
| env: | ||
| TAG: ${{ github.ref_name }} | ||
| run: | | ||
| uv run --no-project --with packaging==26.3 python - <<'PY' | ||
| import os | ||
| import pathlib | ||
| import sys | ||
|
|
||
| from packaging.version import Version | ||
|
|
||
| wheels = list(pathlib.Path("dist").glob("*.whl")) | ||
| if len(wheels) != 1: | ||
| sys.exit(f"expected one wheel, found {wheels}") | ||
| built = Version(wheels[0].name.split("-")[1]) | ||
| tag = Version(os.environ["TAG"]) | ||
| if built != tag: | ||
| sys.exit(f"built version {built} does not match tag {tag}") | ||
| print(f"version {built} matches tag") | ||
| PY | ||
| - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| if-no-files-found: error | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/project/indico-client/ | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI forces old tox on 3.9
Medium Severity
setup-uvsetsUV_PYTHONto the matrix interpreter, anduvx --with tox-uv toxruns against that interpreter. Currenttox-uv(and recenttox) require Python 3.11+, so thepy39andpy310jobs can fail to resolve or pull arbitrarily old tool versions. That is not the same as the localtox py39–py313run described in the PR, and those matrix legs were not proven on GitHub runners.Reviewed by Cursor Bugbot for commit fdbc13d. Configure here.