From e449164fdb05ff6fff0e7fd5cf5efc3b7aace9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:32:12 +0100 Subject: [PATCH 1/5] Re-add test step to CI --- .gitea/workflows/build-docker.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-docker.yml b/.gitea/workflows/build-docker.yml index 443ff9f..7b7235d 100644 --- a/.gitea/workflows/build-docker.yml +++ b/.gitea/workflows/build-docker.yml @@ -2,12 +2,20 @@ name: Django CI/CD on: push: - branches: [ main ] paths-ignore: [ 'README.md' ] jobs: + test: + runs-on: python:3.12 + steps: + - python -m pip install poetry + - poetry install + - poetry env info + - poetry run python manage.py migrate + - poetry run pytest build-and-push: runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4 -- 2.40.1 From 47f008628fbabad1c88bb33639d5990953fe46f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:36:28 +0100 Subject: [PATCH 2/5] Add test workflow --- .gitea/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..d6138f3 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,13 @@ +name: Test + +on: [ push, pull_request ] + +jobs: + run-tests: + runs-on: python:3.12 + steps: + - python -m pip install poetry + - poetry install + - poetry env info + - poetry run python manage.py migrate + - poetry run pytest -- 2.40.1 From 32c632f7a6cd91676ebdb6e7790a659f969847e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:36:41 +0100 Subject: [PATCH 3/5] Move the test workflow out --- .gitea/workflows/build-docker.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build-docker.yml b/.gitea/workflows/build-docker.yml index 7b7235d..8c2bff6 100644 --- a/.gitea/workflows/build-docker.yml +++ b/.gitea/workflows/build-docker.yml @@ -1,18 +1,11 @@ -name: Django CI/CD +name: Build and upload container on: push: + branches: [ main ] paths-ignore: [ 'README.md' ] jobs: - test: - runs-on: python:3.12 - steps: - - python -m pip install poetry - - poetry install - - poetry env info - - poetry run python manage.py migrate - - poetry run pytest build-and-push: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' -- 2.40.1 From d79f387de709d0828aaf9752ab5d1b92e0788a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:39:29 +0100 Subject: [PATCH 4/5] Revert "Move the test workflow out" This reverts commit 32c632f7a6cd91676ebdb6e7790a659f969847e5. --- .gitea/workflows/build-docker.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-docker.yml b/.gitea/workflows/build-docker.yml index 8c2bff6..7b7235d 100644 --- a/.gitea/workflows/build-docker.yml +++ b/.gitea/workflows/build-docker.yml @@ -1,11 +1,18 @@ -name: Build and upload container +name: Django CI/CD on: push: - branches: [ main ] paths-ignore: [ 'README.md' ] jobs: + test: + runs-on: python:3.12 + steps: + - python -m pip install poetry + - poetry install + - poetry env info + - poetry run python manage.py migrate + - poetry run pytest build-and-push: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' -- 2.40.1 From a1b3e1efc23dd44c0e48329748ee0e2f20f0a2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 18 Nov 2023 10:39:43 +0100 Subject: [PATCH 5/5] Revert "Add test workflow" This reverts commit 47f008628fbabad1c88bb33639d5990953fe46f0. --- .gitea/workflows/test.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml deleted file mode 100644 index d6138f3..0000000 --- a/.gitea/workflows/test.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Test - -on: [ push, pull_request ] - -jobs: - run-tests: - runs-on: python:3.12 - steps: - - python -m pip install poetry - - poetry install - - poetry env info - - poetry run python manage.py migrate - - poetry run pytest -- 2.40.1