Skip to content

Merge pull request #364 from lmb-embrapa/azneto-patch-1 #29

Merge pull request #364 from lmb-embrapa/azneto-patch-1

Merge pull request #364 from lmb-embrapa/azneto-patch-1 #29

Workflow file for this run

name: Machado CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
test:
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
POSTGRES_DB: yourdatabase
ports:
- 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:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Lint with flake8
run: |
pip install flake8 flake8-black
flake8 machado
- name: Create project
run: |
django-admin startproject WEBPROJECT
- name: Run Tests
run: |
python WEBPROJECT/manage.py test machado --settings machado.tests.settings