Skip to content

Commit 924b44e

Browse files
committed
fix test release workflow to check build artifacts, not TestPyPI
1 parent 5f16f6b commit 924b44e

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

.github/workflows/test-release.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
11
name: Test Release
22

33
on:
4-
workflow_run:
5-
workflows: ["CI"]
6-
types:
7-
- completed
4+
push:
5+
branches:
6+
- main
87

98
jobs:
10-
test-release:
11-
name: Build and Publish to TestPyPI
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
9+
sanity-check:
10+
name: Build and Verify Artifacts
11+
needs: ci
1312
runs-on: ubuntu-latest
1413

1514
steps:
16-
- uses: actions/checkout@v4
15+
- name: Checkout code
16+
uses: actions/checkout@v4
1717

1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: '3.11'
21+
python-version: "3.11"
2222

2323
- name: Install Poetry
2424
run: |
2525
curl -sSL https://install.python-poetry.org | python3 -
2626
echo "$HOME/.local/bin" >> $GITHUB_PATH
2727
28-
- name: Configure Poetry for TestPyPI
29-
run: |
30-
poetry config repositories.testpypi https://test.pypi.org/legacy/
31-
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }}
32-
33-
- name: Install dependencies
34-
run: poetry install --only main
28+
- name: Ensure ~/.casa/data exists
29+
run: mkdir -p ~/.casa/data
3530

36-
- name: Build and verify package
31+
- name: Build package
3732
run: |
33+
poetry install --no-root
3834
poetry build
39-
pip install --upgrade build twine
35+
36+
- name: Check artifacts with twine
37+
run: |
38+
pip install twine
4039
twine check dist/*
4140
42-
- name: Publish to TestPyPI
43-
run: poetry publish -r testpypi --skip-existing
41+
- name: Create test venv and install package
42+
run: |
43+
python -m venv testenv
44+
source testenv/bin/activate
45+
pip install dist/*.whl
46+
47+
python -c "import dstools"
48+
49+
dstools-extract-ds --help || echo "No CLI tool found"
50+
51+
- name: Clean up
52+
if: always()
53+
run: rm -rf testenv

0 commit comments

Comments
 (0)