1111 pull_request :
1212
1313jobs :
14- test :
15-
16- runs-on : ${{ matrix.os }}
17-
18- strategy :
19- fail-fast : false
20- matrix :
21- python : ["310", "311", "312", "313"]
22- sqlalchemy : ["14", "20"]
23- os : [ubuntu-latest, windows-latest]
24-
25- steps :
26- - uses : actions/checkout@v1
27- - uses : prefix-dev/setup-pixi@v0.9.1
28- with :
29- pixi-version : v0.49.0
30- - name : Test
31- run : pixi run -e py${{ matrix.python }}-sqla${{ matrix.sqlalchemy }} test-cov
32- - name : Upload codecov
33- uses : codecov/codecov-action@v3
34- with :
35- token : ${{ secrets.CODECOV_TOKEN }}
36- fail_ci_if_error : true
14+ # test:
15+
16+ # runs-on: ${{ matrix.os }}
17+
18+ # strategy:
19+ # fail-fast: false
20+ # matrix:
21+ # python: ["310", "311", "312", "313"]
22+ # sqlalchemy: ["14", "20"]
23+ # os: [ubuntu-latest, windows-latest]
24+
25+ # steps:
26+ # - uses: actions/checkout@v1
27+ # - uses: prefix-dev/setup-pixi@v0.9.1
28+ # with:
29+ # pixi-version: v0.49.0
30+ # - name: Test
31+ # run: pixi run -e py${{ matrix.python }}-sqla${{ matrix.sqlalchemy }} test-cov
32+ # - name: Upload codecov
33+ # uses: codecov/codecov-action@v3
34+ # with:
35+ # token: ${{ secrets.CODECOV_TOKEN }}
36+ # fail_ci_if_error: true
3737
3838 lint :
3939
@@ -50,13 +50,11 @@ jobs:
5050 - name : Test
5151 run : pixi run lint
5252
53- deploy :
54-
55- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
53+ build :
5654
5755 runs-on : ubuntu-latest
5856
59- needs : test
57+ # needs: test
6058
6159 steps :
6260 - uses : actions/checkout@v2
@@ -66,11 +64,59 @@ jobs:
6664 - name : Build package
6765 run : |
6866 pixi run -e build build
69- - name : Publish package to PyPI
70- uses : pypa/gh-action-pypi-publish@release/v1
67+ - name : Archive build artifacts
68+ uses : actions/upload-artifact@v4
69+ with :
70+ name : dist
71+ path : |
72+ dist
73+
74+ test-build :
75+ name : Test build files
76+ runs-on : ubuntu-latest
77+ needs : build
78+ steps :
79+ - name : Load build artifacts
80+ uses : actions/download-artifact@v4
81+ with :
82+ name : dist
83+ path : |
84+ dist
85+
86+ - name : Set up Python
87+ uses : actions/setup-python@v2
88+ with :
89+ python-version : " 3.10"
90+ - name : Install local package
91+ run : |
92+ python -m pip install --upgrade pip
93+ # python -m pip install dist/serialchemy*.whl
94+ - name : Test local package
95+ run : |
96+ python -c "import serialchemy"
97+
98+ pypi-publish :
99+
100+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
101+
102+ name : Publish package PyPI
103+ runs-on : ubuntu-latest
104+ needs : build
105+ environment :
106+ name : pypi
107+ url : https://pypi.org/p/serialchemy
108+ permissions :
109+ id-token : write
110+ steps :
111+ - name : Load build artifacts
112+ uses : actions/download-artifact@v4
71113 with :
72- user : __token__
73- password : ${{ secrets.pypi_token }}
114+ name : dist
115+ path : |
116+ dist
117+
118+ - name : Publish package distributions to PyPI
119+ uses : pypa/gh-action-pypi-publish@release/v1
74120
75121 sonarcloud :
76122
0 commit comments