From 03fd2ea4120d3e1c827d68e8df3ec2df19e93373 Mon Sep 17 00:00:00 2001 From: alexandru-m-g Date: Mon, 20 Nov 2023 16:10:41 +0200 Subject: [PATCH] Testing also the inno server --- .github/workflows/run-tests-demo.yml | 2 +- .github/workflows/run-tests-inno.yml | 28 +++++++++++++++++++++++++++ .github/workflows/run-tests-stage.yml | 2 +- util/config.py | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/run-tests-inno.yml diff --git a/.github/workflows/run-tests-demo.yml b/.github/workflows/run-tests-demo.yml index d2d8ca1..cdef08e 100644 --- a/.github/workflows/run-tests-demo.yml +++ b/.github/workflows/run-tests-demo.yml @@ -25,4 +25,4 @@ jobs: run: pytest env: TESTS_SPREADSHEET_URL: ${{ vars.TESTS_SPREADSHEET_URL }} - BASE_URL: ${{ vars.BASE_URL_DEMO }} + BASE_URL: ${{ secrets.BASE_URL_DEMO }} diff --git a/.github/workflows/run-tests-inno.yml b/.github/workflows/run-tests-inno.yml new file mode 100644 index 0000000..a804422 --- /dev/null +++ b/.github/workflows/run-tests-inno.yml @@ -0,0 +1,28 @@ +name: Run tests on inno + +on: + workflow_dispatch: + schedule: + - cron: '8 7 * * *' + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install requirements + run: | + pip install -r requirements.txt + - name: Test with pytest + run: pytest + env: + TESTS_SPREADSHEET_URL: ${{ vars.TESTS_SPREADSHEET_URL }} + BASE_URL: ${{ secrets.BASE_URL_INNO }} diff --git a/.github/workflows/run-tests-stage.yml b/.github/workflows/run-tests-stage.yml index 608e947..30be68b 100644 --- a/.github/workflows/run-tests-stage.yml +++ b/.github/workflows/run-tests-stage.yml @@ -25,4 +25,4 @@ jobs: run: pytest env: TESTS_SPREADSHEET_URL: ${{ vars.TESTS_SPREADSHEET_URL }} - BASE_URL: ${{ vars.BASE_URL_STAGE }} + BASE_URL: ${{ secrets.BASE_URL_STAGE }} diff --git a/util/config.py b/util/config.py index accb92b..6f0f8c3 100644 --- a/util/config.py +++ b/util/config.py @@ -1,7 +1,7 @@ import os -BASE_URL = os.getenv("BASE_URL", "https://stage.hapi-humdata-org.ahconu.org/") +BASE_URL = os.getenv("BASE_URL", "https://HAPI_SERVER_URL/") TESTS_SPREADSHEET_URL = os.getenv('TESTS_SPREADSHEET_URL', 'https://docs.google.com/spreadsheets/d/e/2PACX-1vTFjBRwN0KGAhxH1ujSQR17fjaSabkHCht3Jhq9gUqjON5ONYx_K_avBui4SulTgZ3SrKkFBoFRHZIH/pub?gid=0&single=true&output=csv')