From 44af6fda41b2b572d83d7f6fbe4350a4d37b0711 Mon Sep 17 00:00:00 2001 From: Chinedum Echeta <60179183+cecheta@users.noreply.github.com> Date: Wed, 22 May 2024 15:22:35 +0100 Subject: [PATCH] ci: Run Python unit and functional tests together (#959) --- .github/workflows/tests.yml | 6 ++---- Makefile | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3d9a69d27..903d035ef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -77,8 +77,8 @@ jobs: fi echo "MIN_COVERAGE=$MIN_COVERAGE" >> "$GITHUB_OUTPUT" - - name: Run Unit tests - run: make unittest optional_args="--junitxml=coverage-junit.xml --cov=. --cov-report xml:coverage.xml --cov-fail-under ${{ steps.coverage-value.outputs.MIN_COVERAGE }}" + - name: Run Python Tests + run: make python-test optional_args="--junitxml=coverage-junit.xml --cov=. --cov-report xml:coverage.xml --cov-fail-under ${{ steps.coverage-value.outputs.MIN_COVERAGE }}" - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: @@ -87,8 +87,6 @@ jobs: coverage-junit.xml coverage.xml if-no-files-found: error - - name: Run Functional tests - run: make functionaltest - name: Setup node uses: actions/setup-node@v4 with: diff --git a/Makefile b/Makefile index 227ccd9f6..77880d882 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,10 @@ build-frontend: ## 🏗️ Build the Frontend webapp @echo -e "\e[34m$@\e[0m" || true @cd code/frontend && npm install && npm run build +python-test: ## 🧪 Run Python unit + functional tests + @echo -e "\e[34m$@\e[0m" || true + @poetry run pytest -m "not azure" $(optional_args) + unittest: ## 🧪 Run the unit tests @echo -e "\e[34m$@\e[0m" || true @poetry run pytest -m "not azure and not functional" $(optional_args)