Skip to content

Merge pull request #141 from netzkolchose/fix_docs_build #155

Merge pull request #141 from netzkolchose/fix_docs_build

Merge pull request #141 from netzkolchose/fix_docs_build #155

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
django_32:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=3.2"
pip install -r example/requirements-ci.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
django_42:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=4.2"
pip install -r example/requirements-ci.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
mysql:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: database
ports: ['3306:3306']
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=4.2"
pip install -r example/requirements-ci.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
env:
DBENGINE: mysql
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
env:
DBENGINE: mysql
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
postgres:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
mysql:
image: postgres:latest
env:
POSTGRES_PASSWORD: mysecretpassword
ports: ['5432:5432']
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=4.2"
pip install -r example/requirements-ci.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
env:
DBENGINE: postgres
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
env:
DBENGINE: postgres
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
postgres-psycopg3:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
mysql:
image: postgres:latest
env:
POSTGRES_PASSWORD: mysecretpassword
ports: ['5432:5432']
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=4.2"
pip install -r example/requirements-ci-psycopg3.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
env:
DBENGINE: postgres
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
env:
DBENGINE: postgres
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
mariadb:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
mysql:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: database
ports: ['3306:3306']
steps:
- uses: actions/checkout@v2
- uses: kamiazya/setup-graphviz@v1
- 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
pip install "Django~=4.2"
pip install -r example/requirements-ci.txt
- name: Setup DB
run: |
./example/manage.py makemigrations
./example/manage.py migrate
env:
DBENGINE: mysql
- name: Run tests
run: |
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test exampleapp
coverage run --parallel-mode --branch --source='computedfields' ./example/manage.py test test_full
coverage combine
coverage report
env:
DBENGINE: mysql
- name: Build docs
run: |
cd docs && make html
cd ../
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
coveralls_finish:
needs: [django_32, django_42, mysql, postgres, postgres-psycopg3, mariadb]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true