-
Notifications
You must be signed in to change notification settings - Fork 33
36 lines (34 loc) · 978 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish
on:
release:
types:
- published
jobs:
build-test:
runs-on: ubuntu-latest
env:
uv_version: "0.5.2"
python_version: "3.12"
steps:
- uses: actions/checkout@v2
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.uv_version }}
- name: Build the project
run: uv build --no-sources --python ${{ env.python_version }}
- name: Sync only the test dependencies
run: uv sync --no-install-project --extra test
- name: Install and test source distribution
run: |
uv pip install dist/*.tar.gz
uv run --no-sync pytest
uv pip uninstall e3fp
- name: Install and test wheel
run: |
uv pip install dist/*.whl
uv run --no-sync pytest
- name: Publish to PyPI
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}