From b93137455b6171c056054efd3daa7872a8d9ea42 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:20:35 +0100 Subject: [PATCH 01/11] Create test.yml --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..9edd50c2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: G2P API tests + +on: [pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: | + python manage.py migrate + python manage.py test gene2phenotype_app.tests From b7b3c5c4ae6764e4747a2e4e3c3d57241b8136a4 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:27:36 +0100 Subject: [PATCH 02/11] Update directories --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9edd50c2..59ba1c5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,10 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + working-directory: gene2phenotype_api - name: Run tests run: | python manage.py migrate python manage.py test gene2phenotype_app.tests + working-directory: gene2phenotype_api/gene2phenotype_project From ce238c94d14c1c1cc00c344be4bbfe6a6e896413 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:29:39 +0100 Subject: [PATCH 03/11] Update directory --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59ba1c5f..6b26dda3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - working-directory: gene2phenotype_api - name: Run tests run: | From c1f061d118d5db6ce90b3b6d29cebb02a89b2d3b Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:33:12 +0100 Subject: [PATCH 04/11] Test another directory --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b26dda3..85689d07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,5 @@ jobs: - name: Run tests run: | - python manage.py migrate - python manage.py test gene2phenotype_app.tests - working-directory: gene2phenotype_api/gene2phenotype_project + python gene2phenotype_api/gene2phenotype_project/manage.py migrate + python gene2phenotype_api/gene2phenotype_project/manage.py test gene2phenotype_app.tests From 483bed34e392e260be6c7fad4674d435a5841f77 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:34:49 +0100 Subject: [PATCH 05/11] Update test.yml --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85689d07..3d20db6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,5 +21,4 @@ jobs: - name: Run tests run: | - python gene2phenotype_api/gene2phenotype_project/manage.py migrate - python gene2phenotype_api/gene2phenotype_project/manage.py test gene2phenotype_app.tests + which manage.py From 291f0b1167a5c6ebc9572dee3f7aa5dc971786bd Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:41:21 +0100 Subject: [PATCH 06/11] Update test.yml --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d20db6c..0f8475af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,4 +21,6 @@ jobs: - name: Run tests run: | - which manage.py + python manage.py migrate + python manage.py test gene2phenotype_app.tests + working-directory: /home/runner/work/gene2phenotype_api/gene2phenotype_project From 3e4b7e70ed80d72b0d7b5252e6c7352274f1a529 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:46:54 +0100 Subject: [PATCH 07/11] Update test.yml --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f8475af..9f2e0040 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Change to the root directory + run: cd gene2phenotype_api + - name: Set up Python uses: actions/setup-python@v2 with: @@ -23,4 +26,3 @@ jobs: run: | python manage.py migrate python manage.py test gene2phenotype_app.tests - working-directory: /home/runner/work/gene2phenotype_api/gene2phenotype_project From 49b9f784669f8cf6b4dbdc30387f7bfd88785517 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:47:52 +0100 Subject: [PATCH 08/11] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f2e0040..54141f86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: uses: actions/checkout@v2 - name: Change to the root directory - run: cd gene2phenotype_api + run: cd home/runner/work/gene2phenotype_api - name: Set up Python uses: actions/setup-python@v2 From 35058a73ca29be15cbce9e797d07538303668694 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:48:37 +0100 Subject: [PATCH 09/11] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54141f86..9548bb36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: uses: actions/checkout@v2 - name: Change to the root directory - run: cd home/runner/work/gene2phenotype_api + run: cd /home/runner/work/gene2phenotype_api - name: Set up Python uses: actions/setup-python@v2 From 074c797393ed9ef970c6c76b25115c4db5a63a32 Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:50:29 +0100 Subject: [PATCH 10/11] Update test.yml --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9548bb36..2345eee6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: uses: actions/checkout@v2 - name: Change to the root directory - run: cd /home/runner/work/gene2phenotype_api + run: cd /home/runner/work - name: Set up Python uses: actions/setup-python@v2 @@ -26,3 +26,4 @@ jobs: run: | python manage.py migrate python manage.py test gene2phenotype_app.tests + working-directory: gene2phenotype_project From f584d94ceb265d7a8f4ec72f8f57ecfc2125185b Mon Sep 17 00:00:00 2001 From: Diana Lemos <44366649+dglemos@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:59:57 +0100 Subject: [PATCH 11/11] Add secret_key --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2345eee6..87797253 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,4 +26,6 @@ jobs: run: | python manage.py migrate python manage.py test gene2phenotype_app.tests + env: + SECRET_KEY: ${{ secrets.SECRET_KEY }} working-directory: gene2phenotype_project