Skip to content

logs

logs #20

Workflow file for this run

name: CI tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
env:
- TOXENV: django22-postgres,django22-postgres-nativejson,django22-sqlite,django22-mysql
- TOXENV: django30-postgres,django30-postgres-nativejson
- TOXENV: django30-sqlite,django30-sqlite-nativejson
- TOXENV: django30-mysql,django30-mysql-nativejson
- TOXENV: django31-postgres,django31-postgres-nativejson
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: djstripe
POSTGRES_DB: djstripe
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: djstripe
MYSQL_DATABASE: djstripe
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox codecov
- name: Test with tox
run: tox -e postgres,postgres-nativejson
- name: Check test coverage
run: codecov
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install flake8 isort black . djangorestframework
- name: Check for flake8 issues
run: flake8 .
- name: Check code formatting with Black
run: black . --check
- name: Check import ordering with isort
run: isort . --check --diff
- name: Check for missing migrations
run: python manage.py makemigrations --check --dry-run
env:
DJSTRIPE_TEST_DB_VENDOR: sqlite
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install .[docs]
- name: Build documentation
run: mkdocs build
env:
DJANGO_SETTINGS_MODULE: docs.django_settings
PYTHONPATH: "."