Skip to content

Commit

Permalink
Try just sdist builds?
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmervdl committed Sep 3, 2024
1 parent 9d0c455 commit c428435
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,13 @@ jobs:
run: echo "VERSION = \"${GITHUB_REF_NAME:1}\"" > opuscleaner/__about__.py

- name: Build
run: python -m build
run: python -m build --sdist

- uses: actions/upload-artifact@v3
with:
name: sdist
path: dist/opuscleaner-*.tar.gz

- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/opuscleaner-*.whl

run_tests:
needs: [build]
name: Run tests
Expand All @@ -50,11 +45,11 @@ jobs:

- uses: actions/download-artifact@v3
with:
name: wheels
name: sdist
path: dist

- name: Install
run: python3 -m pip install dist/opuscleaner-*.whl
run: python3 -m pip install dist/opuscleaner-*.tar.gz

- name: Run runtime unittest
run: python3 -m unittest discover -s test
Expand All @@ -67,11 +62,6 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- uses: actions/download-artifact@v3
with:
name: sdist
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ path = "opuscleaner/__about__.py"

[tool.hatch.envs.default]
dependencies = ["pytest", "pytest-cov"]

[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=opuscleaner --cov=tests {args}"
no-cov = "cov --no-cov {args}"
Expand All @@ -52,7 +53,7 @@ include = ["/opuscleaner"]
[tool.hatch.build.force-include]
"frontend/dist" = "/opuscleaner/frontend"

[[tool.hatch.build.hooks.build-scripts.scripts]]
[[tool.hatch.build.target.sdist.hooks.build-scripts.scripts]]
work_dir = "frontend"
commands = ["npm clean-install && npm run build"]
artifacts = ["/frontend/dist"]
Expand Down

0 comments on commit c428435

Please sign in to comment.