1 parent 438ce0c commit 25003a9Copy full SHA for 25003a9
1 file changed
.github/workflows/pypi-publish.yml
@@ -1,15 +1,32 @@
1
-name: Upload Package to PyPI
2
-# authorization handled via trusted publishers, see https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
+name: Check and Publish
+
3
on:
4
push:
5
branches:
6
- main
7
+ pull_request:
8
+ branches:
9
+ - main
10
11
permissions:
12
contents: read
13
14
jobs:
15
+ test:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
19
+ - name: Set up Python
20
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
21
+ with:
22
+ python-version: '3.x'
23
+ - run: pip install .
24
+ - run: pip install pytest
25
+ - run: pytest -v
26
27
deploy:
28
+ needs: test
29
+ if: github.event_name != 'pull_request'
30
runs-on: ubuntu-latest
31
32
id-token: write
0 commit comments