From 056cb014861cc593520b7fe0831b697b1ac68e65 Mon Sep 17 00:00:00 2001 From: Martin Gruber Date: Sun, 22 Sep 2024 17:54:32 +0200 Subject: [PATCH] use 'python3 -m' to run pytest in CI --- .github/workflows/actions.yml | 2 +- .gitlab-ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 1c26a0a..1af734c 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -42,5 +42,5 @@ jobs: run: poetry install - name: Test - run: poetry run pytest -v --cov=flapy --cov-branch --cov-report html:cov_html --cov-report=term-missing tests/ + run: poetry run python3 -m pytest -v --cov=flapy --cov-branch --cov-report html:cov_html --cov-report=term-missing tests/ working-directory: ${{ github.workspace }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb5b371..293c486 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ before_script: .unit-tests: &unit-tests stage: test script: - - poetry run pytest -v --cov=flapy --cov-branch --cov-report html:cov_html --cov-report=term-missing tests/ + - poetry run python3 -m pytest -v --cov=flapy --cov-branch --cov-report html:cov_html --cov-report=term-missing tests/ artifacts: paths: - cov_html @@ -37,7 +37,7 @@ unit-tests:python-3.10: - poetry install - poetry add --dev pytest-random-order script: - - for ((i=1; i<=10; i++)); do echo "test run ${i}\n"; poetry run pytest -q --cov=flaky_analysis --cov-branch --random-order --random-order-bucket=global ; done + - for ((i=1; i<=10; i++)); do echo "test run ${i}\n"; poetry run python3 -m pytest -q --cov=flaky_analysis --cov-branch --random-order --random-order-bucket=global ; done nightly-tests:python-3.8: extends: .nightly-tests