From fc9b4c36a4339024d743a61bf80aa4976c925854 Mon Sep 17 00:00:00 2001 From: Samuel Bertin <116896072+sam-bertin@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:40:06 +0100 Subject: [PATCH 1/5] CI Workflow test Build and test of the django application --- .github/workflows/django.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..ed8a634 --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,30 @@ +name: Django CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9, 3.12] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run Tests + run: | + python manage.py test From 1b2e95289ae172d1395891c74d3f2684fe40af5d Mon Sep 17 00:00:00 2001 From: Samuel Bertin <116896072+sam-bertin@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:42:14 +0100 Subject: [PATCH 2/5] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index ed8a634..c98e9cf 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9, 3.12] + python-version: [3.9, 3.12] steps: - uses: actions/checkout@v3 From c486a508c3c51ae7bf0d7dbeefa20ae71eedaec1 Mon Sep 17 00:00:00 2001 From: Samuel Bertin <116896072+sam-bertin@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:50:51 +0100 Subject: [PATCH 3/5] Update django.yml --- .github/workflows/django.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index c98e9cf..3296ed2 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -21,6 +21,14 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Create config.ini + run: | + echo "[authentication]" > config.ini + echo "username=${{ secrets.USERNAME }}" >> config.ini + echo "password=${{ secrets.PASSWORD }}" >> config.ini + echo " " >> config.ini + echo "city_url=${{ secrets.CITY_URL }}" >> config.ini + echo "hotel_url=${{ secrets.HOTEL_URL}}" >> config.ini - name: Install Dependencies run: | python -m pip install --upgrade pip From 451f15e91de02b2f979973f0f6a9b054f0d706b8 Mon Sep 17 00:00:00 2001 From: Samuel Bertin <116896072+sam-bertin@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:52:33 +0100 Subject: [PATCH 4/5] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 3296ed2..b1e9c55 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9, 3.12] + python-version: [3.12] steps: - uses: actions/checkout@v3 From 2c00d9a9a189f52efa843ed466f925594506c6f8 Mon Sep 17 00:00:00 2001 From: Samuel Bertin <116896072+sam-bertin@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:54:32 +0100 Subject: [PATCH 5/5] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index b1e9c55..4dfad3e 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -27,6 +27,7 @@ jobs: echo "username=${{ secrets.USERNAME }}" >> config.ini echo "password=${{ secrets.PASSWORD }}" >> config.ini echo " " >> config.ini + echo "[urls]" >> config.ini echo "city_url=${{ secrets.CITY_URL }}" >> config.ini echo "hotel_url=${{ secrets.HOTEL_URL}}" >> config.ini - name: Install Dependencies