From f2a3ba0011ab19892d319612734e91a8fd7bddb3 Mon Sep 17 00:00:00 2001 From: Vasile Popescu Date: Thu, 22 Aug 2024 14:08:06 +0200 Subject: [PATCH 1/2] Change the husky hook from pre-commit to pre-push --- front_end/.husky/{pre-commit => pre-push} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename front_end/.husky/{pre-commit => pre-push} (100%) diff --git a/front_end/.husky/pre-commit b/front_end/.husky/pre-push similarity index 100% rename from front_end/.husky/pre-commit rename to front_end/.husky/pre-push From 0d45c44ade686da927927eaef5136d5ba4f87874 Mon Sep 17 00:00:00 2001 From: Vasile Popescu Date: Thu, 22 Aug 2024 14:36:58 +0200 Subject: [PATCH 2/2] Fix the integration test failure mode If the pytest was failing, because it was piped into sed, the whole script was not existing with a non-zero code. --- .github/workflows/integration_tests.yml | 19 +++++++++++-------- scripts/run_integration_tests.sh | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 7f5a3ae19f..4d5dc84318 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -77,14 +77,6 @@ jobs: cache-dependency-path: front_end/package-lock.json - name: "Install node_modules and build the frontend" run: cd front_end && npm ci && npm run build - # Uncomment this to stop the job at this spot, and get a remote shell into the VM - # - name: Get tty-share - # if: always() - # run: | - # curl -L https://github.com/elisescu/tty-share/releases/download/v2.4.0/tty-share_linux-amd64 -o tty-share - # chmod u+x ./tty-share - # export TERM=xterm-256color - # ./tty-share -A --public --headless --headless-cols 255 --headless-rows 50 --no-wait --listen :8001 - name: Run the integration tests if: always() env: @@ -95,7 +87,18 @@ jobs: SECRET_KEY: ${{ secrets.SECRET_KEY }} run: | PLAYWRIGHT_BROWSERS_PATH=.venv scripts/run_integration_tests.sh + - name: Create trace.zip + if: always() + run: | mkdir -p trace && cd trace && unzip ../trace.zip && rm ../trace.zip + # Uncomment this to stop the job at this spot, and get a remote shell into the VM + # - name: Get tty-share + # if: always() + # run: | + # curl -L https://github.com/elisescu/tty-share/releases/download/v2.4.0/tty-share_linux-amd64 -o tty-share + # chmod u+x ./tty-share + # export TERM=xterm-256color + # ./tty-share -A --public --headless --headless-cols 255 --headless-rows 50 --no-wait --listen :8001 - name: "Upload trace.zip" uses: actions/upload-artifact@v4 if: always() diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh index f430c6c017..5c3a302c5f 100755 --- a/scripts/run_integration_tests.sh +++ b/scripts/run_integration_tests.sh @@ -1,6 +1,7 @@ #!/bin/bash set -x set -e +set -o pipefail cleanup() { for process in "next-server" "gunicorn" "dramatiq"; do