From 22dcaa28ed5e4b02d17161d61d5542746d071d10 Mon Sep 17 00:00:00 2001 From: francis Date: Sat, 2 Mar 2024 18:08:30 +0100 Subject: [PATCH 1/6] build: create backend testing workflow --- backend/.github/workflows/backend-tests.yaml | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 backend/.github/workflows/backend-tests.yaml diff --git a/backend/.github/workflows/backend-tests.yaml b/backend/.github/workflows/backend-tests.yaml new file mode 100644 index 00000000..66c0d432 --- /dev/null +++ b/backend/.github/workflows/backend-tests.yaml @@ -0,0 +1,23 @@ +name: backend-tests + +on: + push: + branches: [main, development] + pull_request: + branches: [main, development] + +jobs: + test: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Execute tests + run: python manage.py test \ No newline at end of file From 1ba19f0fce8d070616ef09568174adbd40e22b69 Mon Sep 17 00:00:00 2001 From: francis Date: Sat, 2 Mar 2024 18:45:31 +0100 Subject: [PATCH 2/6] build: temporarily add automated-testing branch for automated testing --- backend/.github/workflows/backend-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/.github/workflows/backend-tests.yaml b/backend/.github/workflows/backend-tests.yaml index 66c0d432..b057f67a 100644 --- a/backend/.github/workflows/backend-tests.yaml +++ b/backend/.github/workflows/backend-tests.yaml @@ -2,7 +2,7 @@ name: backend-tests on: push: - branches: [main, development] + branches: [main, development, automated-testing] pull_request: branches: [main, development] From 333d3c953591c15b7b280251d9668aeec037f319 Mon Sep 17 00:00:00 2001 From: francis Date: Sat, 2 Mar 2024 18:48:21 +0100 Subject: [PATCH 3/6] fix: move .github folder to root --- {backend/.github => .github}/workflows/backend-tests.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {backend/.github => .github}/workflows/backend-tests.yaml (100%) diff --git a/backend/.github/workflows/backend-tests.yaml b/.github/workflows/backend-tests.yaml similarity index 100% rename from backend/.github/workflows/backend-tests.yaml rename to .github/workflows/backend-tests.yaml From e8687f515bb5bfccaefbef95ef725ee9115d6440 Mon Sep 17 00:00:00 2001 From: francis Date: Sat, 2 Mar 2024 18:56:29 +0100 Subject: [PATCH 4/6] fix: file references --- .github/workflows/backend-tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend-tests.yaml b/.github/workflows/backend-tests.yaml index b057f67a..29990feb 100644 --- a/.github/workflows/backend-tests.yaml +++ b/.github/workflows/backend-tests.yaml @@ -18,6 +18,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install -r ./backend/requirements.txt - name: Execute tests - run: python manage.py test \ No newline at end of file + run: python ./backend/manage.py test \ No newline at end of file From 9d55664d80add7478a8fe16514a2c4f6c0061c9d Mon Sep 17 00:00:00 2001 From: Francis Vauterin <159532420+francisvaut@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:45:34 +0100 Subject: [PATCH 5/6] build: add tests to workflow_dispatch group for testing purposes --- .github/workflows/backend-tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backend-tests.yaml b/.github/workflows/backend-tests.yaml index 29990feb..0266c44e 100644 --- a/.github/workflows/backend-tests.yaml +++ b/.github/workflows/backend-tests.yaml @@ -5,6 +5,7 @@ on: branches: [main, development, automated-testing] pull_request: branches: [main, development] + workflow_dispatch: jobs: test: @@ -20,4 +21,4 @@ jobs: python -m pip install --upgrade pip pip install -r ./backend/requirements.txt - name: Execute tests - run: python ./backend/manage.py test \ No newline at end of file + run: python ./backend/manage.py test From 434579fc12b7bdc921cde2a3b1f4a3ab73995ea3 Mon Sep 17 00:00:00 2001 From: Francis Vauterin <159532420+francisvaut@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:53:02 +0100 Subject: [PATCH 6/6] chore: remove automated-testing branch from testing workflow --- .github/workflows/backend-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend-tests.yaml b/.github/workflows/backend-tests.yaml index 0266c44e..cd8149f7 100644 --- a/.github/workflows/backend-tests.yaml +++ b/.github/workflows/backend-tests.yaml @@ -2,7 +2,7 @@ name: backend-tests on: push: - branches: [main, development, automated-testing] + branches: [main, development] pull_request: branches: [main, development] workflow_dispatch: