@@ -3,7 +3,6 @@ name: Build
33on : [push, pull_request]
44
55jobs :
6-
76 test :
87 runs-on : ubuntu-latest
98
@@ -28,58 +27,63 @@ jobs:
2827 - 3306:3306
2928 env :
3029 MARIADB_ROOT_PASSWORD : fastapiuserspassword
30+ MARIADB_DATABASE : fastapiusers
31+ MARIADB_USER : fastapiusers
32+ MARIADB_PASSWORD : fastapiuserspassword
3133
3234 strategy :
3335 fail-fast : false
3436 matrix :
35- python_version : [3.7, 3.8, 3.9, '3.10']
36- database_url : [
37- ' sqlite+aiosqlite:///./fastapiusers.db' ,
38- ' postgresql+asyncpg://fastapiusers:fastapiuserspassword@localhost:5432/fastapiusers' ,
39- ' mysql+aiomysql://root:fastapiuserspassword@localhost:3306/fastapiusers' ,
40- ]
37+ python_version : [3.7, 3.8, 3.9, "3.10"]
38+ database_url :
39+ [
40+ " sqlite+aiosqlite:///./fastapiusers.db" ,
41+ " postgresql+asyncpg://fastapiusers:fastapiuserspassword@localhost:5432/fastapiusers" ,
42+ " mysql+aiomysql://root:fastapiuserspassword@localhost:3306/fastapiusers" ,
43+ ]
4144
4245 steps :
43- - uses : actions/checkout@v3
44- - name : Set up Python
45- uses : actions/setup-python@v3
46- with :
47- python-version : ${{ matrix.python_version }}
48- - name : Install dependencies
49- run : |
50- python -m pip install --upgrade pip
51- pip install -r requirements.dev.txt
52- - name : Test with pytest
53- env :
54- DATABASE_URL : ${{ matrix. database_url }}
55- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
56- run : |
57- pytest --cov=fastapi_users_db_sqlalchemy/
58- codecov
59- - name : Build and install it on system host
60- run : |
61- flit build
62- flit install --python $(which python)
63- python test_build.py
46+ - uses : actions/checkout@v3
47+ - name : Set up Python
48+ uses : actions/setup-python@v3
49+ with :
50+ python-version : ${{ matrix.python_version }}
51+ - name : Install dependencies
52+ run : |
53+ python -m pip install --upgrade pip
54+ pip install -r requirements.dev.txt
55+ - name : Test with pytest
56+ env :
57+ DATABASE_URL : ${{ matrix.database_url }}
58+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
59+ run : |
60+ pytest --cov=fastapi_users_db_sqlalchemy/
61+ codecov
62+ - name : Build and install it on system host
63+ run : |
64+ git status
65+ flit build
66+ flit install --python $(which python)
67+ python test_build.py
6468
6569 release :
6670 runs-on : ubuntu-latest
6771 needs : test
6872 if : startsWith(github.ref, 'refs/tags/')
6973
7074 steps :
71- - uses : actions/checkout@v1
72- - name : Set up Python
73- uses : actions/setup-python@v1
74- with :
75- python-version : 3.7
76- - name : Install dependencies
77- run : |
78- python -m pip install --upgrade pip
79- pip install -r requirements.dev.txt
80- - name : Release on PyPI
81- env :
82- FLIT_USERNAME : ${{ secrets.FLIT_USERNAME }}
83- FLIT_PASSWORD : ${{ secrets.FLIT_PASSWORD }}
84- run : |
85- flit publish
75+ - uses : actions/checkout@v1
76+ - name : Set up Python
77+ uses : actions/setup-python@v1
78+ with :
79+ python-version : 3.7
80+ - name : Install dependencies
81+ run : |
82+ python -m pip install --upgrade pip
83+ pip install -r requirements.dev.txt
84+ - name : Release on PyPI
85+ env :
86+ FLIT_USERNAME : ${{ secrets.FLIT_USERNAME }}
87+ FLIT_PASSWORD : ${{ secrets.FLIT_PASSWORD }}
88+ run : |
89+ flit publish
0 commit comments