Skip to content

Commit

Permalink
Merge b096bb6 into a68a73f
Browse files Browse the repository at this point in the history
  • Loading branch information
nnsnodnb committed Jun 7, 2021
2 parents a68a73f + b096bb6 commit 33a67da
Show file tree
Hide file tree
Showing 17 changed files with 674 additions and 296 deletions.
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 120
ignore = E203,W503,W504
exclude = ./venv/*,
./github/*,
./*/migrations/*,
59 changes: 59 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Tests

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']

name: Python ${{ matrix.python-version }} tests

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get full python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Bootstrap environment
run: |
python -m ensurepip
python -m pip install -U pip
python -m pip install poetry
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
- name: Setup cache
uses: actions/cache@v2
id: cache
with:
path: .venv
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: |
timeout 10s python -m poetry run pip --version || rm -rf .venv
- name: Install dependencies
run: |
python -m poetry install --no-root
- name: Run tests
env:
DJANGO_SETTINGS_MODULE: tests.settings
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
python -m poetry run python -m pytest -v tests
python -m poetry run coverage report
python -m poetry run coveralls
3 changes: 0 additions & 3 deletions demo/app/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from django.contrib import admin

# Register your models here.
3 changes: 0 additions & 3 deletions demo/app/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from django.db import models

# Create your models here.
3 changes: 0 additions & 3 deletions demo/app/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from django.test import TestCase

# Create your tests here.

0 comments on commit 33a67da

Please sign in to comment.