From 2deda60d1cd28b3083444c0873c03521c3735d48 Mon Sep 17 00:00:00 2001 From: Sverre Nystad Date: Sun, 21 Jan 2024 12:50:23 +0100 Subject: [PATCH] Build: Add Docker CI and manual Django workflows --- .github/workflows/docker_ci.yml | 22 +++++++++++++++++++ .../{django.yml => manual_django.yml} | 0 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/docker_ci.yml rename .github/workflows/{django.yml => manual_django.yml} (100%) diff --git a/.github/workflows/docker_ci.yml b/.github/workflows/docker_ci.yml new file mode 100644 index 0000000..fcac6f2 --- /dev/null +++ b/.github/workflows/docker_ci.yml @@ -0,0 +1,22 @@ +name: Django CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v3 + - name: Build docker image and run tests + run: | + cd backend + docker compose build + docker compose up -d + docker compose run gpf python manage.py test + docker compose down \ No newline at end of file diff --git a/.github/workflows/django.yml b/.github/workflows/manual_django.yml similarity index 100% rename from .github/workflows/django.yml rename to .github/workflows/manual_django.yml