Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sanic #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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