From 386e033ea5065504dd26d360ba409a36d563e127 Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Fri, 29 Nov 2024 23:12:16 +0100 Subject: [PATCH] Move shell scripts into scripts directory --- .github/workflows/nightly-tests.yml | 2 +- .github/workflows/publish-test.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- pyproject.toml | 3 +-- .../compile_translations.sh | 0 run_e2e_testsuite.sh => scripts/run_e2e_testsuite.sh | 8 +++++++- update_translations.sh => scripts/update_translations.sh | 0 8 files changed, 12 insertions(+), 7 deletions(-) rename compile_translations.sh => scripts/compile_translations.sh (100%) rename run_e2e_testsuite.sh => scripts/run_e2e_testsuite.sh (78%) rename update_translations.sh => scripts/update_translations.sh (100%) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 35477c2..d4f796e 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -38,7 +38,7 @@ jobs: - name: Compile translations run: | - /bin/sh ./compile_translations.sh + /bin/sh ./scripts/compile_translations.sh - name: Run 'future' tests id: test diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml index 79450c4..9a46dec 100644 --- a/.github/workflows/publish-test.yml +++ b/.github/workflows/publish-test.yml @@ -42,7 +42,7 @@ jobs: - name: Compile translations run: | - /bin/sh ./compile_translations.sh + /bin/sh ./scripts/compile_translations.sh - name: Build package distributions run: python -m build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc3d196..5b8970b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,7 @@ jobs: - name: Compile translations run: | - /bin/sh ./compile_translations.sh + /bin/sh ./scripts/compile_translations.sh - name: Build package distributions run: python -m build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91f18ab..c7aaf54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: python -m pip install .[testing] tox coverage - name: Compile translations - run: /bin/sh ./compile_translations.sh + run: /bin/sh ./scripts/compile_translations.sh # This step runs only for jobs NOT in the include matrix - name: Run tox targets for Python ${{ matrix.python }} diff --git a/pyproject.toml b/pyproject.toml index 0b55146..efc191b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,8 +89,7 @@ include = [ "sandbox/", "client/", "tests/", - "update_translations.sh", - "compile_translations.sh", + "scripts/", "README.md", "LICENSE", "CHANGELOG.md", diff --git a/compile_translations.sh b/scripts/compile_translations.sh similarity index 100% rename from compile_translations.sh rename to scripts/compile_translations.sh diff --git a/run_e2e_testsuite.sh b/scripts/run_e2e_testsuite.sh similarity index 78% rename from run_e2e_testsuite.sh rename to scripts/run_e2e_testsuite.sh index 966c79b..f6e9578 100755 --- a/run_e2e_testsuite.sh +++ b/scripts/run_e2e_testsuite.sh @@ -14,4 +14,10 @@ set -e # ./run_e2e_testsuite.sh --tracing on playwright install chromium -DJANGO_ALLOW_ASYNC_UNSAFE=1 python -m pytest --browser chromium --headed tests/e2e/ $@ +if [ "$CI" ]; then + EXTRA_ARGS="--tracing on" +else + EXTRA_ARGS="--headed" +fi + +DJANGO_ALLOW_ASYNC_UNSAFE=1 python -m pytest --browser chromium $EXTRA_ARGS tests/e2e/ $@ diff --git a/update_translations.sh b/scripts/update_translations.sh similarity index 100% rename from update_translations.sh rename to scripts/update_translations.sh