From 39784fee52ac8942811b36fcdee43f9638a65832 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:28:44 +0000 Subject: [PATCH 1/7] New release workflow --- .github/release-drafter.yml | 44 ------ .../workflows/{build.yml => build-wheels.yml} | 32 +---- .github/workflows/ci.yml | 2 +- .github/workflows/release-drafter.yml | 50 ------- .github/workflows/release.yml | 134 +++++++++++++++--- Cargo.lock | 6 +- README.md | 2 +- crates/karva/Cargo.toml | 2 +- crates/karva_cli/Cargo.toml | 2 +- pyproject.toml | 4 +- python/karva/__init__.py | 2 +- seal.toml | 31 ++++ 12 files changed, 160 insertions(+), 151 deletions(-) delete mode 100644 .github/release-drafter.yml rename .github/workflows/{build.yml => build-wheels.yml} (88%) delete mode 100644 .github/workflows/release-drafter.yml create mode 100644 seal.toml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 75702bc2..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,44 +0,0 @@ -name-template: v$RESOLVED_VERSION -tag-template: v$RESOLVED_VERSION -template: | - ## Release Notes - - $CHANGES - - ## Contributors - - $CONTRIBUTORS - -change-template: "- $TITLE @$AUTHOR ([#$NUMBER](https://github.com/MatthewMckee4/karva/pull/$NUMBER))" - -categories: - - title: Bug Fixes - label: bug - - title: Reporting - label: reporting - - title: Extensions - labels: - - "extensions/fixtures" - - "extensions/tags" - - title: Discovery - label: discovery - - title: CLI - label: cli - - title: Documentation - label: documentation - -version-resolver: - default: patch - -exclude-contributors: - - dependabot - - dependabot[bot] - -include-labels: - - bug - - reporting - - extensions/fixtures - - extensions/tags - - discovery - - cli - - documentation diff --git a/.github/workflows/build.yml b/.github/workflows/build-wheels.yml similarity index 88% rename from .github/workflows/build.yml rename to .github/workflows/build-wheels.yml index d5f4dbf6..1cc0d556 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-wheels.yml @@ -1,12 +1,14 @@ -name: Build / Release PyPI +name: Build Wheels on: - push: - tags: - - v[0-9]*.[0-9]*.[0-9]* - workflow_call: + pull_request: + paths: + # When we change pyproject.toml, we want to ensure that the maturin builds still work. + - pyproject.toml + # And when we change this workflow itself... + - .github/workflows/build-wheels.yml permissions: {} jobs: @@ -168,23 +170,3 @@ jobs: with: name: wheels-sdist path: dist - - release: - name: "release" - - runs-on: ubuntu-latest - - if: startsWith(github.ref, 'refs/tags/') - - needs: [linux, musllinux, windows, macos, sdist] - - steps: - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - - - name: Publish to PyPI - uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - with: - command: upload - args: --non-interactive --skip-existing wheels-*/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f54bfee7..ed681375 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -271,7 +271,7 @@ jobs: needs: determine_changes if: ${{ (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/build-binaries.yml project-diff: name: "run project diff" diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 51238353..00000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Release Drafter and Labels - -on: - push: - branches: - - main - - pull_request: - types: [edited, opened, reopened, synchronize, unlabeled, labeled] - -permissions: - contents: read - -jobs: - update_release_draft: - permissions: - contents: write - pull-requests: write - - runs-on: ubuntu-latest - - steps: - - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - require_label: - if: github.event.pull_request - - needs: [update_release_draft] - - runs-on: ubuntu-latest - - permissions: - issues: write - pull-requests: write - - steps: - - name: Wait for labels to be added - # Don't shout at the PR author right away - run: sleep 20 - - - uses: mheap/github-action-required-labels@8afbe8ae6ab7647d0c9f0cfa7c2f939650d22509 # v5.5.1 - with: - mode: minimum - count: 1 - labels: ".+" - add_comment: true - use_regex: true - message: "Please add a label to this pull request." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07cb86d9..2ae898fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,46 +1,136 @@ name: Release on: - push: - tags: - - v[0-9]*.[0-9]*.[0-9]* + workflow_dispatch: + inputs: + tag: + description: "Tag to release (e.g., 1.0.0)" + required: true + default: dry-run + type: string + + pull_request: env: PYTHON_VERSION: "3.14" +permissions: + contents: write + pull-requests: write + jobs: - release_github: + generate-release: + name: Generate release metadata runs-on: ubuntu-latest + outputs: + release-metadata: ${{ steps.seal-generate.outputs.metadata }} + tag: ${{ github.event.inputs.tag }} + + steps: + - name: Checkout repository + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + persist-credentials: false + + - name: Install seal + run: | + curl --proto '=https' --tlsv1.2 -LsSf https://github.com/MatthewMckee4/seal/releases/download/0.0.1-alpha.5/seal-installer.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - permissions: - contents: write + - name: Generate release metadata + id: seal-generate + run: | + METADATA=$(seal generate release) + echo "metadata<> $GITHUB_OUTPUT + echo "$METADATA" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + echo "Release metadata:" + echo "$METADATA" + + build-wheels: + name: Build wheels + needs: generate-release + if: github.event_name == 'workflow_dispatch' + uses: ./.github/workflows/build-wheels.yml + + create-release: + name: Create GitHub release + runs-on: ubuntu-latest + needs: [generate-release, build-wheels] + if: github.event_name == 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + - name: Checkout repository + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Publish Latest Draft + - name: Download all wheels + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + pattern: wheels-*/* + + - name: Parse release metadata + id: parse-metadata run: | - if gh release list | grep Draft; then - old_version="$(gh release list | grep Draft | head -1 | cut -f1)" - new_version="${GITHUB_REF_NAME}" - body=$(gh release view "$old_version" --json body -q ".body" | sed "s/\.\.\.$old_version/...$new_version/g") - gh release delete "$old_version" - gh release create "$new_version" --title "${GITHUB_REF_NAME}" --notes "$body"; - else - gh release create "$new_version" --title "${GITHUB_REF_NAME}"; + METADATA='${{ needs.generate-release.outputs.release-metadata }}' + TITLE=$(echo "$METADATA" | jq -r '.title') + BODY=$(echo "$METADATA" | jq -r '.body') + PRERELEASE=$(echo "$METADATA" | jq -r '.prerelease') + + echo "title=$TITLE" >> $GITHUB_OUTPUT + echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT + + # Save body to file to handle multiline content + echo "$BODY" > $RUNNER_TEMP/release-notes.txt + + - name: Create git tag + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag ${{ needs.generate-release.outputs.tag }} + git push origin ${{ needs.generate-release.outputs.tag }} + + - name: Create GitHub release + run: | + PRERELEASE_FLAG="" + if [ "${{ steps.parse-metadata.outputs.prerelease }}" = "true" ]; then + PRERELEASE_FLAG="--prerelease" fi - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - publish-docs: + gh release create "${{ needs.generate-release.outputs.tag }}" \ + --title "${{ steps.parse-metadata.outputs.title }}" \ + --notes-file "$RUNNER_TEMP/release-notes.txt" \ + $PRERELEASE_FLAG \ + wheels-*/* + + publish-pypi: + name: Publish to PyPI runs-on: ubuntu-latest + needs: [generate-release, build-wheels, create-release] + if: github.event_name == 'workflow_dispatch' - name: Docs builder and publisher + steps: + - name: Download all wheels + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + pattern: wheels-* - permissions: - contents: write + - name: Publish to PyPI + uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + with: + command: upload + args: --non-interactive --skip-existing wheels-*/* + + publish-docs: + name: Publish documentation + runs-on: ubuntu-latest + needs: create-release + if: github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 diff --git a/Cargo.lock b/Cargo.lock index 5993726b..eaf59479 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "karva" -version = "0.1.11" +version = "0.0.0" dependencies = [ "karva_cli", "karva_core", @@ -1166,7 +1166,7 @@ dependencies = [ [[package]] name = "karva_cli" -version = "0.1.11" +version = "0.0.0" dependencies = [ "anyhow", "argfile", @@ -2721,7 +2721,7 @@ dependencies = [ [[package]] name = "winapi-util" -version = "0.1.11" +version = "0.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ diff --git a/README.md b/README.md index 92c8c5a1..dd9521ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Karva (0.1.11) +# Karva (0.0.0) [![codecov](https://codecov.io/gh/MatthewMckee4/karva/graph/badge.svg?token=VELHBTE1L9)](https://codecov.io/gh/MatthewMckee4/karva) ![PyPI - Version](https://img.shields.io/pypi/v/karva) diff --git a/crates/karva/Cargo.toml b/crates/karva/Cargo.toml index 6ddc87c3..c3ce3a43 100644 --- a/crates/karva/Cargo.toml +++ b/crates/karva/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "karva" -version = "0.1.11" +version = "0.0.0" edition = { workspace = true } rust-version = { workspace = true } diff --git a/crates/karva_cli/Cargo.toml b/crates/karva_cli/Cargo.toml index 67b2f78d..382bc846 100644 --- a/crates/karva_cli/Cargo.toml +++ b/crates/karva_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "karva_cli" -version = "0.1.11" +version = "0.0.0" default-run = "karva" edition = { workspace = true } diff --git a/pyproject.toml b/pyproject.toml index 165ff29c..ea325e80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["maturin>=1.7,<2.0"] [project] name = "karva" -version = "0.1.11" +version = "0.0.0" description = "A Python test framework, written in Rust." authors = [{ name = "Matthew McKee", email = "matthewmckee4@yahoo.co.uk" }] license = { file = "LICENSE" } @@ -127,7 +127,7 @@ message_template = "Bump to v{new_version}" tag_template = "v{new_version}" [tool.tbump.version] -current = "0.1.11" +current = "0.0.0" regex = ''' (?P\d+) \. diff --git a/python/karva/__init__.py b/python/karva/__init__.py index d0344196..1fc6b27c 100644 --- a/python/karva/__init__.py +++ b/python/karva/__init__.py @@ -13,7 +13,7 @@ tags, ) -__version__ = "0.1.11" +__version__ = "0.0.0" __all__: list[str] = [ "FailError", diff --git a/seal.toml b/seal.toml new file mode 100644 index 00000000..bb00c847 --- /dev/null +++ b/seal.toml @@ -0,0 +1,31 @@ +[release] +current-version = "0.0.0" + +version-files = [ + "README.md", + "crates/karva/Cargo.toml", + "crates/karva_python/Cargo.toml", + "pyproject.toml", + "python/karva/__init__.py", + { path = "dist-workspace.toml", field = "workspace.version", format = "toml" } +] + +commit-message = "Release v{version}" +branch-name = "release/v{version}" +push = true +confirm = true + +[changelog.section-labels] +"Bug Fixes" = ["bug"] +"Reporting" = ["reporting"] +"Extensions" = ["extensions/fixtures", "extensions/tags"] +"Configuration" = ["configuration"] +"Discovery" = ["discovery"] +"CLI" = ["cli"] +"Documentation" = ["documentation"] + +[changelog] +ignore-contributors = ["dependabot[bot]"] +ignore-labels = ["internal", "ci", "duplicate", "rust", "wontfix", "needs-decision"] +include-contributors = true +changelog-heading = "{version}" From be3735eedf91635a1f7c883cb5bc1dc965adafe0 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:31:55 +0000 Subject: [PATCH 2/7] Fix prek --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 23 ++++++++++++++--------- Cargo.lock | 4 ++-- README.md | 4 ++-- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed681375..30b771df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -265,13 +265,13 @@ jobs: run: cargo codspeed run --bench ${{ matrix.project }} mode: walltime - build-binaries: + build-wheels: name: "build binaries" needs: determine_changes if: ${{ (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} - uses: ./.github/workflows/build-binaries.yml + uses: ./.github/workflows/build-wheels.yml project-diff: name: "run project diff" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ae898fd..a2450970 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,7 @@ on: env: PYTHON_VERSION: "3.14" -permissions: - contents: write - pull-requests: write +permissions: {} jobs: generate-release: @@ -74,8 +72,9 @@ jobs: - name: Parse release metadata id: parse-metadata + env: + METADATA: ${{ needs.generate-release.outputs.release-metadata }} run: | - METADATA='${{ needs.generate-release.outputs.release-metadata }}' TITLE=$(echo "$METADATA" | jq -r '.title') BODY=$(echo "$METADATA" | jq -r '.body') PRERELEASE=$(echo "$METADATA" | jq -r '.prerelease') @@ -87,21 +86,27 @@ jobs: echo "$BODY" > $RUNNER_TEMP/release-notes.txt - name: Create git tag + env: + TAG: ${{ needs.generate-release.outputs.tag }} run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git tag ${{ needs.generate-release.outputs.tag }} - git push origin ${{ needs.generate-release.outputs.tag }} + git tag "$TAG" + git push origin "$TAG" - name: Create GitHub release + env: + TAG: ${{ needs.generate-release.outputs.tag }} + TITLE: ${{ steps.parse-metadata.outputs.title }} + PRERELEASE: ${{ steps.parse-metadata.outputs.prerelease }} run: | PRERELEASE_FLAG="" - if [ "${{ steps.parse-metadata.outputs.prerelease }}" = "true" ]; then + if [ "$PRERELEASE" = "true" ]; then PRERELEASE_FLAG="--prerelease" fi - gh release create "${{ needs.generate-release.outputs.tag }}" \ - --title "${{ steps.parse-metadata.outputs.title }}" \ + gh release create "$TAG" \ + --title "$TITLE" \ --notes-file "$RUNNER_TEMP/release-notes.txt" \ $PRERELEASE_FLAG \ wheels-*/* diff --git a/Cargo.lock b/Cargo.lock index eaf59479..6f23b39a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2721,11 +2721,11 @@ dependencies = [ [[package]] name = "winapi-util" -version = "0.0.0" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/README.md b/README.md index dd9521ff..4f6f9759 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ > [!NOTE] > > Sadly, this will not be very well maintained and should not be used for anything important. -> I wanted to see if I could make a better `pytest`. But unless I completely diverge from the +> I wanted to see if I could make a better `pytest`. But unless I completely diverge from the > current architecture and basically start again, and try to make a better `pytest-xdist`, the > performance of this will not be much better than `pytest`, let alone `pytest-xdist`. > -> Thanks for taking an interest! Perhaps I will have a proper go at this in the future. +> Thanks for taking an interest! Perhaps I will have a proper go at this in the future. A Python test framework, written in Rust. From af4ee64d50f9f34ff05d2e8aac72116cc21cb955 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:33:36 +0000 Subject: [PATCH 3/7] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..825c32f0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog From 6324fda734aebf6bf183b94ed4f95c6f6d1cbdf2 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:38:16 +0000 Subject: [PATCH 4/7] Update release --- .github/workflows/release.yml | 7 +++++++ CHANGELOG.md | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2450970..f4654467 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,13 @@ jobs: with: persist-credentials: false + - name: Check changelog is not empty + run: | + if [ ! -s CHANGELOG.md ]; then + echo "::error::CHANGELOG.md is empty. Please add changes before creating a release." + exit 0 + fi + - name: Install seal run: | curl --proto '=https' --tlsv1.2 -LsSf https://github.com/MatthewMckee4/seal/releases/download/0.0.1-alpha.5/seal-installer.sh | sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f0..e69de29b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +0,0 @@ -# Changelog From 0016342862393d90cae98eca35c2ea79e899bf49 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:39:37 +0000 Subject: [PATCH 5/7] Dont run release on pr --- .github/workflows/release.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4654467..fe010ac9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,6 @@ on: default: dry-run type: string - pull_request: - env: PYTHON_VERSION: "3.14" @@ -30,13 +28,6 @@ jobs: with: persist-credentials: false - - name: Check changelog is not empty - run: | - if [ ! -s CHANGELOG.md ]; then - echo "::error::CHANGELOG.md is empty. Please add changes before creating a release." - exit 0 - fi - - name: Install seal run: | curl --proto '=https' --tlsv1.2 -LsSf https://github.com/MatthewMckee4/seal/releases/download/0.0.1-alpha.5/seal-installer.sh | sh From 366541972bde41111086c7c4ce3ff51a97ff07a9 Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:54:52 +0000 Subject: [PATCH 6/7] Fix tests --- .github/workflows/release.yml | 35 +++++++++++-------- crates/karva_core/src/collection/models.rs | 2 +- .../src/discovery/models/package.rs | 2 +- .../src/normalize/models/package.rs | 2 +- .../karva_projects/src/real_world_projects.rs | 2 +- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe010ac9..68341037 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,15 +31,17 @@ jobs: - name: Install seal run: | curl --proto '=https' --tlsv1.2 -LsSf https://github.com/MatthewMckee4/seal/releases/download/0.0.1-alpha.5/seal-installer.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Generate release metadata id: seal-generate run: | METADATA=$(seal generate release) - echo "metadata<> $GITHUB_OUTPUT - echo "$METADATA" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + { + echo "metadata<> "$GITHUB_OUTPUT" echo "Release metadata:" echo "$METADATA" @@ -77,11 +79,13 @@ jobs: BODY=$(echo "$METADATA" | jq -r '.body') PRERELEASE=$(echo "$METADATA" | jq -r '.prerelease') - echo "title=$TITLE" >> $GITHUB_OUTPUT - echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT + { + echo "title=$TITLE" + echo "prerelease=$PRERELEASE" + } >> "$GITHUB_OUTPUT" # Save body to file to handle multiline content - echo "$BODY" > $RUNNER_TEMP/release-notes.txt + echo "$BODY" > "$RUNNER_TEMP/release-notes.txt" - name: Create git tag env: @@ -98,16 +102,19 @@ jobs: TITLE: ${{ steps.parse-metadata.outputs.title }} PRERELEASE: ${{ steps.parse-metadata.outputs.prerelease }} run: | - PRERELEASE_FLAG="" + ARGS=( + "$TAG" + --title "$TITLE" + --notes-file "$RUNNER_TEMP/release-notes.txt" + ) + if [ "$PRERELEASE" = "true" ]; then - PRERELEASE_FLAG="--prerelease" + ARGS+=(--prerelease) fi - gh release create "$TAG" \ - --title "$TITLE" \ - --notes-file "$RUNNER_TEMP/release-notes.txt" \ - $PRERELEASE_FLAG \ - wheels-*/* + ARGS+=(wheels-*/*) + + gh release create "${ARGS[@]}" publish-pypi: name: Publish to PyPI diff --git a/crates/karva_core/src/collection/models.rs b/crates/karva_core/src/collection/models.rs index 5b8c8e8f..48b29957 100644 --- a/crates/karva_core/src/collection/models.rs +++ b/crates/karva_core/src/collection/models.rs @@ -65,7 +65,7 @@ impl CollectedModule { pub struct CollectedPackage { pub(crate) path: Utf8PathBuf, pub(crate) modules: HashMap, - pub(crate) packages: HashMap, + pub(crate) packages: HashMap, pub(crate) configuration_module_path: Option, } diff --git a/crates/karva_core/src/discovery/models/package.rs b/crates/karva_core/src/discovery/models/package.rs index 707c9e95..ce5cc900 100644 --- a/crates/karva_core/src/discovery/models/package.rs +++ b/crates/karva_core/src/discovery/models/package.rs @@ -9,7 +9,7 @@ use crate::{discovery::DiscoveredModule, name::ModulePath}; pub struct DiscoveredPackage { path: Utf8PathBuf, modules: HashMap, - packages: HashMap, + packages: HashMap, configuration_module_path: Option, } diff --git a/crates/karva_core/src/normalize/models/package.rs b/crates/karva_core/src/normalize/models/package.rs index ee5ceb01..2aa04e16 100644 --- a/crates/karva_core/src/normalize/models/package.rs +++ b/crates/karva_core/src/normalize/models/package.rs @@ -8,7 +8,7 @@ use crate::{extensions::fixtures::NormalizedFixture, normalize::models::Normaliz pub struct NormalizedPackage { pub(crate) modules: HashMap, - pub(crate) packages: HashMap, + pub(crate) packages: HashMap, pub(crate) auto_use_fixtures: Arc>, } diff --git a/crates/karva_projects/src/real_world_projects.rs b/crates/karva_projects/src/real_world_projects.rs index fe2b46cb..a4470dc8 100644 --- a/crates/karva_projects/src/real_world_projects.rs +++ b/crates/karva_projects/src/real_world_projects.rs @@ -409,7 +409,7 @@ pub static PYDANTIC_PROJECT: RealWorldProject<'static> = RealWorldProject { name: "pydantic", // Skip recursive test that fails crashes karva and pytest. repository: "https://github.com/MatthewMckee4/pydantic", - commit: "17fc29cd471dd728866a729f08e0b6557cb9340b", + commit: "95068e360c8921db3b342e368154fab925fa299e", paths: &["tests"], dependencies: &[ "pytest", From 48899be66f6712217fc886c3693d286219a000ae Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Sat, 27 Dec 2025 19:57:36 +0000 Subject: [PATCH 7/7] Dont run buld wheels twice --- .github/workflows/build-wheels.yml | 1 + .github/workflows/ci.yml | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 1cc0d556..7f846777 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -9,6 +9,7 @@ on: - pyproject.toml # And when we change this workflow itself... - .github/workflows/build-wheels.yml + permissions: {} jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30b771df..5b51c215 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -265,14 +265,6 @@ jobs: run: cargo codspeed run --bench ${{ matrix.project }} mode: walltime - build-wheels: - name: "build binaries" - - needs: determine_changes - if: ${{ (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }} - - uses: ./.github/workflows/build-wheels.yml - project-diff: name: "run project diff"