@@ -3,12 +3,11 @@ name: Build
33on : [push, pull_request]
44
55jobs :
6-
76 test :
87 runs-on : ubuntu-latest
98 strategy :
109 matrix :
11- python_version : [3.9, '3.10', ' 3.11', ' 3.12', ' 3.13' ]
10+ python_version : ["3.10", " 3.11", " 3.12", " 3.13", "3.14" ]
1211
1312 services :
1413 mongo :
@@ -17,60 +16,60 @@ jobs:
1716 - 27017:27017
1817
1918 steps :
20- - uses : actions/checkout@v4
21- - name : Set up Python
22- uses : actions/setup-python@v5
23- with :
24- python-version : ${{ matrix.python_version }}
25- - name : Install dependencies
26- run : |
27- python -m pip install --upgrade pip
28- pip install hatch
29- hatch env create
30- - name : Lint and typecheck
31- run : |
32- hatch run lint-check
33- - name : Test
34- run : |
35- hatch run test-cov-xml
36- - uses : codecov/codecov-action@v5
37- with :
38- token : ${{ secrets.CODECOV_TOKEN }}
39- fail_ci_if_error : true
40- verbose : true
41- - name : Build and install it on system host
42- run : |
43- hatch build
44- pip install dist/fastapi_users_db_beanie-*.whl
45- python test_build.py
19+ - uses : actions/checkout@v4
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ${{ matrix.python_version }}
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install hatch
28+ hatch env create
29+ - name : Lint and typecheck
30+ run : |
31+ hatch run lint-check
32+ - name : Test
33+ run : |
34+ hatch run test-cov-xml
35+ - uses : codecov/codecov-action@v5
36+ with :
37+ token : ${{ secrets.CODECOV_TOKEN }}
38+ fail_ci_if_error : true
39+ verbose : true
40+ - name : Build and install it on system host
41+ run : |
42+ hatch build
43+ pip install dist/fastapi_users_db_beanie-*.whl
44+ python test_build.py
4645
4746 release :
4847 runs-on : ubuntu-latest
4948 needs : test
5049 if : startsWith(github.ref, 'refs/tags/')
5150
5251 steps :
53- - uses : actions/checkout@v4
54- - name : Set up Python
55- uses : actions/setup-python@v5
56- with :
57- python-version : 3.9
58- - name : Install dependencies
59- shell : bash
60- run : |
61- python -m pip install --upgrade pip
62- pip install hatch
63- - name : Build and publish on PyPI
64- env :
65- HATCH_INDEX_USER : ${{ secrets.HATCH_INDEX_USER }}
66- HATCH_INDEX_AUTH : ${{ secrets.HATCH_INDEX_AUTH }}
67- run : |
68- hatch build
69- hatch publish
70- - name : Create release
71- uses : ncipollo/release-action@v1
72- with :
73- draft : true
74- body : ${{ github.event.head_commit.message }}
75- artifacts : dist/*.whl,dist/*.tar.gz
76- token : ${{ secrets.GITHUB_TOKEN }}
52+ - uses : actions/checkout@v4
53+ - name : Set up Python
54+ uses : actions/setup-python@v5
55+ with :
56+ python-version : " 3.10 "
57+ - name : Install dependencies
58+ shell : bash
59+ run : |
60+ python -m pip install --upgrade pip
61+ pip install hatch
62+ - name : Build and publish on PyPI
63+ env :
64+ HATCH_INDEX_USER : ${{ secrets.HATCH_INDEX_USER }}
65+ HATCH_INDEX_AUTH : ${{ secrets.HATCH_INDEX_AUTH }}
66+ run : |
67+ hatch build
68+ hatch publish
69+ - name : Create release
70+ uses : ncipollo/release-action@v1
71+ with :
72+ draft : true
73+ body : ${{ github.event.head_commit.message }}
74+ artifacts : dist/*.whl,dist/*.tar.gz
75+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments