Skip to content

Commit

Permalink
ci: test build and upload dists
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed Nov 7, 2024
1 parent 35be592 commit 655506e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build distributions for PyPI

on: [push, release] # TODO: change to just release

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.30"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"

- name: Build
run: uv build

- name: Test wheels
run: |
uv venv --no-project testwhl
. testwhl/bin/activate
uv pip install dist/*.whl
cd tests/test_ssh
./run.sh
- name: Test wheels
run: |
uv venv --no-project testsdist
. testsdist/bin/activate
uv pip install dist/*.tar.gz
cd tests/test_ssh
./run.sh
- uses: actions/upload-artifact@v4
with:
path: dist/*

upload:
name: Upload to PyPI
needs: [build]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4

- name: Publish
run: uv publish
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "disbatch"
version = "3.0.0" # TODO dynamic
version = "3.0.0rc1" # TODO dynamic
description = "Dynamically distribute a list of tasks over a pool of compute resources"
readme = "Readme.md"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 655506e

Please sign in to comment.