Skip to content

Commit 17d79a1

Browse files
authored
Run twine check during build, use python-build (#9)
* Run twine check during build * create pixi.lock * fix * build -> python-build
1 parent 4f6e164 commit 17d79a1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/ci-copier.yml

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ jobs:
8080
yq eval '.on = ["push"]' -i .github/workflows/build.yml
8181
git add .github/workflows/ci.yml .github/workflows/build.yml
8282
git commit -m "Replace actions trigger with on: [push]"
83+
# create pixi.lock
84+
pixi list --manifest-path pixi.toml --color=always
85+
git add pixi.lock
86+
git commit -m "Create pixi.lock"
8387
# Push the generated package's HEAD commit to a `ci/*` branch
8488
cid=$(git rev-parse HEAD)
8589
git push -f "${GITHUB_SERVER_URL/https:\/\//git@}:$GITHUB_REPOSITORY" $cid:refs/heads/ci/${GITHUB_SHA}-${{ matrix.minimal-python-version }}

template/.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
environments: build
2121
- name: Build project
2222
run: pixi run -e build build-wheel
23+
- name: Check package
24+
run: pixi run -e build check-wheel
2325
- name: Upload package
2426
uses: actions/upload-artifact@v4
2527
with:

template/pixi.toml.jinja

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ test = "pytest"
2323
test-coverage = "pytest --cov={{ project_slug_snake_case }} --cov-report=xml --cov-report=term-missing"
2424

2525
[feature.build.dependencies]
26-
build = "*"
26+
python-build = "*"
27+
twine = "*"
2728
[feature.build.tasks]
2829
build-wheel = "python -m build --no-isolation ."
30+
check-wheel = "twine check dist/*"
2931

3032
[feature.lint.dependencies]
3133
pre-commit = "*"

0 commit comments

Comments
 (0)