From 9756f8997b28af7d7ebb4036c80047068b0f5e11 Mon Sep 17 00:00:00 2001 From: David Bozhanov Date: Mon, 10 Jun 2024 16:57:29 -0500 Subject: [PATCH] Fix Django CI workflow Add mysqlclient to requirements.txt Remove mysql from django CI workflow Fix python 3 version number in django workflow See https://github.com/actions/setup-python/issues/160 Don't drop DB in CI workflow Remove mysqlclient and mysql from django CI workflow --- .github/workflows/django.yml | 24 ++++-------------------- README.md | 1 - requirements.txt | 2 +- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index c77d348..a8ee496 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,13 +13,11 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.8, 3.9, 3.10] - db: [postgres, mysql] + python-version: [3.8, 3.9, '3.10'] + db: [postgres] include: - db: postgres db_port: 5432 - - db: mysql - db_port: 3306 services: postgres: image: postgres:16 @@ -34,20 +32,6 @@ jobs: --health-timeout 5s --health-retries 5 - mysql: - image: mysql:8 - ports: - - 3306:3306 - env: - MYSQL_ROOT_PASSWORD: SpYkxYy1dMmo7Bk - MYSQL_USER: permagate - MYSQL_PASSWORD: SpYkxYy1dMmo7Bk - options: - --health-cmd "mysqladmin ping" - --health-interval 10s - --health-timeout 5s - --health-retries 3 - steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -58,8 +42,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + - name: Run Tests env: DATABASE_URL: ${{ matrix.db }}://permagate:SpYkxYy1dMmo7Bk@127.0.0.1:${{ matrix.db_port }}/permagate - - name: Run Tests run: | - python manage.py test + python manage.py test --keepdb diff --git a/README.md b/README.md index 8524dcf..1474a1a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # PermaGate ------ [![Django CI](https://github.com/davnov015/django-permagate/actions/workflows/django.yml/badge.svg)](https://github.com/davnov015/django-permagate/actions/workflows/django.yml) PermaGate is a Django permissions system which offers hierarchical permissions that can be diff --git a/requirements.txt b/requirements.txt index 8c4f84f..91ecea5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ Django==4.2.3 django-environ==0.10.0 -psycopg2==2.9.6 \ No newline at end of file +psycopg2==2.9.6