Updated model import #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
mysql: | |
image: mysql:latest | |
env: | |
MYSQL_ROOT_PASSWORD: mysql | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="mysqladmin ping" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
strategy: | |
fail-fast: false | |
matrix: | |
db: [sqlite, postgres, mysql] | |
python-version: [3.6, 3.7, 3.8, 3.9] | |
django-version: [2.2] | |
include: | |
- db: sqlite | |
db_url: sqlite:///test_db.sqlite3 | |
- db: postgres | |
db_url: postgres://postgres:postgres@localhost:5432/postgres' | |
- db: mysql | |
db_url: mysql://root:[email protected]:3306/widgy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip version | |
run: python -m pip install -U pip | |
- name: Upgrade django version | |
run: python -m pip install "Django~=${{ matrix.django-version }}" | |
- name: Install widgy | |
run: python -m pip install -e .[all] | |
- name: Install test requirements | |
run: python -m pip install -r requirements-test.txt | |
- name: Install postgres dependencies | |
if: matrix.db == 'postgres' | |
run: python -m pip install psycopg2 | |
- name: Install mysql dependencies | |
if: matrix.db == 'mysql' | |
run: python -m pip install mysqlclient | |
- name: Run Tests | |
env: | |
DATABASE_URL: ${{ matrix.db_url }} | |
run: | | |
make test |