@@ -2,9 +2,9 @@ name: Unittest
22
33on :
44 push :
5- branches : [ master, develop ]
5+ branches : [ master, develop, pre_*, ft_* ]
66 pull_request :
7- branches : [ master, develop ]
7+ branches : [ master, develop, pre_*, ft_* ]
88
99jobs :
1010 build :
1313 matrix :
1414 python-version : [3.6.14]
1515 poetry-version : [1.1.7]
16- os : [ubuntu-18 .04]
16+ os : [ubuntu-20 .04]
1717 runs-on : ${{ matrix.os }}
1818
1919 env :
@@ -23,26 +23,30 @@ jobs:
2323 DB_PORT : 3306
2424
2525 steps :
26- - uses : actions/checkout@v2
26+ - uses : actions/checkout@v3
2727 - uses : samin/mysql-action@v1.3
2828 with :
2929 mysql version : ' 5.7'
3030 mysql database : ${{ env.DB_DATABASE }}
3131 mysql root password : ${{ env.DB_PASSWORD }}
3232 mysql user : ${{ env.DB_USER }}
3333 mysql password : ${{ env.DB_PASSWORD }}
34+ - name : Install poetry
35+ run : pipx install poetry==${{ matrix.poetry-version }}
36+ - name : Export requirements.txt
37+ run : |
38+ cd src/api/
39+ bash bin/export_requirements_txt.sh
3440 - name : Set up Python
35- uses : actions/setup-python@v2
41+ uses : actions/setup-python@v4
3642 with :
3743 python-version : ${{ matrix.python-version }}
38- - name : Set up Poetry
39- uses : abatilo/actions-poetry@v2.1.0
40- with :
41- poetry-version : ${{ matrix.poetry-version }}
44+ cache : ' pip'
45+ cache-dependency-path : ' src/api/requirements.txt'
4246 - name : Install dependencies
4347 run : |
4448 cd src/api/
45- poetry config virtualenvs.create false && bash bin/install_ci_dependencies.sh
49+ pip install -r requirements.txt -i https://pypi.org/simple/
4650 - name : Run api unittest
4751 env :
4852 DJANGO_SETTINGS_MODULE : " bkuser_core.config.overlays.unittest"
0 commit comments