Skip to content

Commit 210acdc

Browse files
committed
Test new deploy
1 parent a28d312 commit 210acdc

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

.github/workflows/deploy-test.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Build and deploy AtomPacker
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: Build sdist and wheel
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: 3.x
20+
21+
- name: Install PyPA's build
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install --upgrade build
25+
26+
- name: Build distribution archives
27+
run: |
28+
python -m build --wheel --sdist .
29+
30+
- name: Upload distribution archives
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: artifacts
34+
path: |
35+
./dist/*.whl
36+
./dist/*.tar.gz
37+
38+
test-on-different-os:
39+
name: Test on different on ${{ matrix.os }}
40+
runs-on: ${{ matrix.os }}
41+
needs: [build]
42+
strategy:
43+
matrix:
44+
os: [macos-latest, ubuntu-latest, windows-latest]
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: 3.13
52+
53+
- uses: actions/download-artifact@v4
54+
with:
55+
name: artifacts
56+
path: ./dist
57+
58+
- name: Test sdist on ${{ matrix.os }}
59+
run: |
60+
python -m pip install --upgrade pip
61+
python -m pip install pytest
62+
python -m pip install ./dist/atompacker-${{ github.event.release.tag_name }}.tar.gz
63+
python -c 'import AtomPacker; print(AtomPacker.__version__)'
64+
pytest tests --import-mode=importlib --verbose
65+
66+
- name: Test wheel on ${{ matrix.os }}
67+
run: |
68+
python -m pip install --upgrade pip
69+
python -m pip install pytest
70+
python -m pip install ./dist/atompacker-${{ github.event.release.tag_name }}-py3-none-any.whl
71+
python -c 'import AtomPacker; print(AtomPacker.__version__)'
72+
pytest tests --import-mode=importlib --verbose
73+
74+
# pypi-publish:
75+
# name: Upload release to PyPI
76+
# runs-on: ubuntu-latest
77+
# needs: [test-on-different-os]
78+
# environment:
79+
# name: pypi
80+
# url: https://pypi.org/project/AtomPacker
81+
# permissions:
82+
# id-token: write
83+
84+
# steps:
85+
# - uses: actions/setup-python@v5
86+
# with:
87+
# python-version: 3.13
88+
89+
# - uses: actions/download-artifact@v4
90+
# with:
91+
# name: artifacts
92+
# path: ./dist
93+
94+
# - name: Publish package distributions to PyPI
95+
# uses: pypa/gh-action-pypi-publish@release/v1
96+
# with:
97+
# password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)