55 branches :
66 - master
77 tags :
8- - ' v*.*.*'
8+ - " v*.*.*"
99 pull_request :
1010 branches :
1111 - master
@@ -15,58 +15,57 @@ jobs:
1515 runs-on : ubuntu-latest
1616 strategy :
1717 matrix :
18- python-version : [ ' 3.6', ' 3.7', ' 3.8' ]
19- postgres-version : [ ' 9.6', ' 12.1' ]
18+ python-version : [" 3.6", " 3.7", " 3.8", "3.9" ]
19+ postgres-version : [" 9.6", " 12.1" ]
2020 services :
2121 postgres :
2222 image : fantix/postgres-ssl:${{ matrix.postgres-version }}
2323 env :
2424 POSTGRES_USER : gino
2525 ports :
26- - 5432:5432
26+ - 5432:5432
2727 # needed because the postgres container does not provide a healthcheck
2828 options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2929 steps :
30- - name : Checkout source code
31- uses : actions/checkout@v1
32- - name : Set up Python
33- uses : actions/setup-python@v1
34- with :
35- python-version : ${{ matrix.python-version }}
36- - name : virtualenv cache
37- uses : actions/cache@preview
38- with :
39- path : ~/.cache/pypoetry/virtualenvs
40- key : ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
41- restore-keys : |
42- ${{ runner.os }}-${{ matrix.python-version }}-poetry-
43- - name : Install Python dependencies
44- run : |
45- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
46- $HOME/.poetry/bin/poetry install
47- - name : Test with pytest
48- env :
49- DB_HOST : localhost
50- DB_USER : gino
51- run : |
52- $HOME/.poetry/bin/poetry run pytest --cov=src --cov=examples --cov-fail-under=95 --cov-report xml
53- - name : Check code format with black
54- if : matrix.python-version >= '3.6'
55- run : |
30+ - name : Checkout source code
31+ uses : actions/checkout@v1
32+ - name : Set up Python
33+ uses : actions/setup-python@v1
34+ with :
35+ python-version : ${{ matrix.python-version }}
36+ - name : virtualenv cache
37+ uses : actions/cache@preview
38+ with :
39+ path : ~/.cache/pypoetry/virtualenvs
40+ key : ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
41+ restore-keys : |
42+ ${{ runner.os }}-${{ matrix.python-version }}-poetry-
43+ - name : Install Python dependencies
44+ run : |
45+ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
46+ $HOME/.poetry/bin/poetry install
47+ - name : Test with pytest
48+ env :
49+ DB_HOST : localhost
50+ DB_USER : gino
51+ run : |
52+ $HOME/.poetry/bin/poetry run pytest --cov=src --cov=examples --cov-fail-under=95 --cov-report xml
53+ - name : Check code format with black
54+ run : |
5655 $HOME/.poetry/bin/poetry run black --check src
57- - name : Submit coverage report
58- if : matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
59- env :
60- CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_TOKEN }}
61- run : |
62- pip install codacy-coverage
63- python-codacy-coverage -r coverage.xml
56+ - name : Submit coverage report
57+ if : matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
58+ env :
59+ CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_TOKEN }}
60+ run : |
61+ pip install codacy-coverage
62+ python-codacy-coverage -r coverage.xml
6463 release :
6564 runs-on : ubuntu-latest
6665 needs : test
6766 strategy :
6867 matrix :
69- python-version : [ ' 3.8' ]
68+ python-version : [" 3.8" ]
7069 steps :
7170 - name : Checkout source code
7271 if : startsWith(github.ref, 'refs/tags/')
0 commit comments