Skip to content

Commit

Permalink
Update sanic
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas committed Mar 30, 2021
1 parent 7bc7e98 commit f00ffa4
Show file tree
Hide file tree
Showing 6 changed files with 751 additions and 449 deletions.
75 changes: 37 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
tags:
- 'v*.*.*'
- "v*.*.*"
pull_request:
branches:
- master
Expand All @@ -15,58 +15,57 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.6', '3.7', '3.8' ]
postgres-version: [ '9.6', '12.1' ]
python-version: ["3.6", "3.7", "3.8", "3.9"]
postgres-version: ["9.6", "12.1"]
services:
postgres:
image: fantix/postgres-ssl:${{ matrix.postgres-version }}
env:
POSTGRES_USER: gino
ports:
- 5432:5432
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout source code
uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: virtualenv cache
uses: actions/cache@preview
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-poetry-
- name: Install Python dependencies
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
$HOME/.poetry/bin/poetry install
- name: Test with pytest
env:
DB_HOST: localhost
DB_USER: gino
run: |
$HOME/.poetry/bin/poetry run pytest --cov=src --cov=examples --cov-fail-under=95 --cov-report xml
- name: Check code format with black
if: matrix.python-version >= '3.6'
run: |
- name: Checkout source code
uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: virtualenv cache
uses: actions/cache@preview
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-poetry-
- name: Install Python dependencies
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
$HOME/.poetry/bin/poetry install
- name: Test with pytest
env:
DB_HOST: localhost
DB_USER: gino
run: |
$HOME/.poetry/bin/poetry run pytest --cov=src --cov=examples --cov-fail-under=95 --cov-report xml
- name: Check code format with black
run: |
$HOME/.poetry/bin/poetry run black --check src
- name: Submit coverage report
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_TOKEN }}
run: |
pip install codacy-coverage
python-codacy-coverage -r coverage.xml
- name: Submit coverage report
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_TOKEN }}
run: |
pip install codacy-coverage
python-codacy-coverage -r coverage.xml
release:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
python-version: [ '3.8' ]
python-version: ["3.8"]
steps:
- name: Checkout source code
if: startsWith(github.ref, 'refs/tags/')
Expand Down
Loading

0 comments on commit f00ffa4

Please sign in to comment.