From b63500aba0f327af4ca10f7b92294c2728f236ef Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Fri, 27 Sep 2024 12:52:47 +0530 Subject: [PATCH 01/11] ci(cypress_runner): introduce cypress in github ci --- .github/workflows/cypress-tests-runner.yml | 216 +++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 .github/workflows/cypress-tests-runner.yml diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml new file mode 100644 index 00000000000..648ff4c9b25 --- /dev/null +++ b/.github/workflows/cypress-tests-runner.yml @@ -0,0 +1,216 @@ +name: Run Cypress tests + +on: + merge_group: + types: + - checks_requested + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_INCREMENTAL: 0 + CARGO_NET_RETRY: 10 + CONNECTORS: stripe + RUST_BACKTRACE: short + RUSTUP_MAX_RETRIES: 10 + SKIP_STEP: ${{ !((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || !(github.event_name == 'merge_group')}} + DEBUG: cypress:cli + RUST_MIN_STACK: 10485760 + +jobs: + runner: + name: Run Cypress tests + runs-on: hyperswitch-runners + + services: + redis: + image: "public.ecr.aws/docker/library/redis:alpine" + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + postgres: + image: "public.ecr.aws/docker/library/postgres:alpine" + env: + POSTGRES_USER: db_user + POSTGRES_PASSWORD: db_pass + POSTGRES_DB: hyperswitch_db + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + + steps: + - name: Skip tests for PRs from forks + shell: bash + if: ${{ !env.SKIP_STEP }} + run: echo 'Skipping tests for PRs from forks' + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Download Encrypted TOML from S3 and Decrypt + if: ${{ env.SKIP_STEP }} + env: + AWS_ACCESS_KEY_ID: ${{ secrets.CONNECTOR_CREDS_AWS_ACCESS_KEY_ID }} + AWS_REGION: ${{ secrets.CONNECTOR_CREDS_AWS_REGION }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CONNECTOR_CREDS_AWS_SECRET_ACCESS_KEY }} + CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }} + CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}} + DESTINATION_FILE_NAME: "creds.json.gpg" + S3_SOURCE_FILE_NAME: "f64157fe-a8f7-43a8-a268-b17e9a8c305f.json.gpg" + shell: bash + run: | + mkdir -p ".github/secrets" ".github/test" + + aws s3 cp "${CONNECTOR_CREDS_S3_BUCKET_URI}/${S3_SOURCE_FILE_NAME}" ".github/secrets/${DESTINATION_FILE_NAME}" + gpg --quiet --batch --yes --decrypt --passphrase="${CONNECTOR_AUTH_PASSPHRASE}" --output ".github/test/creds.json" ".github/secrets/${DESTINATION_FILE_NAME}" + + - name: Set paths in env + if: ${{ env.SKIP_STEP }} + shell: bash + run: | + echo "CYPRESS_CONNECTOR_AUTH_FILE_PATH=${{ github.workspace }}/.github/test/creds.json" >> $GITHUB_ENV + + - name: Fetch keys + if: ${{ env.SKIP_STEP }} + env: + TOML_PATH: "./config/development.toml" + run: | + LOCAL_ADMIN_API_KEY=$(yq '.secrets.admin_api_key' ${TOML_PATH}) + echo "CYPRESS_ADMINAPIKEY=${LOCAL_ADMIN_API_KEY}" >> $GITHUB_ENV + + - name: Install mold linker + uses: rui314/setup-mold@v1 + if: ${{ runner.os == 'Linux' && env.SKIP_STEP }} + with: + make-default: true + + - name: Install Rust + if: ${{ env.SKIP_STEP }} + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable 2 weeks ago + components: clippy + + - name: Install sccache + if: ${{ env.SKIP_STEP }} + uses: taiki-e/install-action@v2.41.10 + with: + tool: sccache + checksum: true + + - name: Install cargo-nextest + if: ${{ env.SKIP_STEP }} + uses: taiki-e/install-action@v2.41.10 + with: + tool: cargo-nextest + checksum: true + + - name: Install Diesel CLI + if: ${{ env.SKIP_STEP }} + uses: baptiste0928/cargo-install@v3.1.1 + with: + crate: diesel_cli + features: postgres + args: --no-default-features + + - name: Install Just + uses: baptiste0928/cargo-install@v3.1.1 + with: + crate: just + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install Cypress and dependencies + run: | + cd "cypress-tests" + npm ci + cd - + + - name: Run database migrations + if: ${{ env.SKIP_STEP }} + shell: bash + env: + DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db + run: just migrate run --locked-schema + + - name: Build project + if: ${{ env.SKIP_STEP }} + run: cargo build --package router --bin router + + - name: Setup Local Server + if: ${{ env.SKIP_STEP }} + run: | + # Start the server in the background + target/debug/router & + + SERVER_PID=$! + echo "PID=${SERVER_PID}" >> $GITHUB_ENV + + # Wait for the server to start in port 8080 + COUNT=0 + while ! nc -z localhost 8080; do + if [ $COUNT -gt 12 ]; then # Wait for up to 2 minutes (12 * 10 seconds) + echo "Server did not start within a reasonable time. Exiting." + kill ${SERVER_PID} + exit 1 + else + COUNT=$((COUNT+1)) + sleep 10 + fi + done + + - name: Run Cypress tests + if: ${{ env.SKIP_STEP }} + env: + CYPRESS_BASEURL: "http://localhost:8080" + shell: bash -leo pipefail {0} + run: | + cd cypress-tests + + RED='\033[0;31m' + RESET='\033[0m' + + failed_connectors=() + + for connector in $(echo "${CONNECTORS}" | tr "," "\n"); do + echo "${connector}" + for service in "payments" "payouts"; do + if ! ROUTER__SERVER__WORKERS=4 CYPRESS_CONNECTOR="${connector}" npm run cypress:"${service}"; then + failed_connectors+=("${connector}-${service}") + fi + done + done + + if [ ${#failed_connectors[@]} -gt 0 ]; then + echo -e "${RED}One or more connectors failed to run:${RESET}" + printf '%s\n' "${failed_connectors[@]}" + exit 1 + fi + + kill "${{ env.PID }}" + + - name: Upload Cypress test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: cypress-test-results + path: | + cypress-tests/cypress/reports/*.json + cypress-tests/cypress/reports/*.html + retention-days: 1 From 72df07045b605caa7e7d3891d4b8b9ffd93f330e Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:11:50 +0530 Subject: [PATCH 02/11] ci: remove `workflow_dispatch` --- .github/workflows/cypress-tests-runner.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index 648ff4c9b25..288610f64e7 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -5,7 +5,6 @@ on: types: - checks_requested pull_request: - workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 8dd40bbf9a17864dbea85e227f6f0a6c013218c5 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:15:37 +0530 Subject: [PATCH 03/11] ci: fix logic --- .github/workflows/cypress-tests-runner.yml | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index 288610f64e7..edf9e0f79d5 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -16,7 +16,7 @@ env: CONNECTORS: stripe RUST_BACKTRACE: short RUSTUP_MAX_RETRIES: 10 - SKIP_STEP: ${{ !((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || !(github.event_name == 'merge_group')}} + SKIP_TESTS: ${{ !((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) && !(github.event_name == 'merge_group')}} DEBUG: cypress:cli RUST_MIN_STACK: 10485760 @@ -52,14 +52,14 @@ jobs: steps: - name: Skip tests for PRs from forks shell: bash - if: ${{ !env.SKIP_STEP }} + if: ${{ !env.SKIP_TESTS }} run: echo 'Skipping tests for PRs from forks' - name: Checkout repository uses: actions/checkout@v4 - name: Download Encrypted TOML from S3 and Decrypt - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} env: AWS_ACCESS_KEY_ID: ${{ secrets.CONNECTOR_CREDS_AWS_ACCESS_KEY_ID }} AWS_REGION: ${{ secrets.CONNECTOR_CREDS_AWS_REGION }} @@ -76,13 +76,13 @@ jobs: gpg --quiet --batch --yes --decrypt --passphrase="${CONNECTOR_AUTH_PASSPHRASE}" --output ".github/test/creds.json" ".github/secrets/${DESTINATION_FILE_NAME}" - name: Set paths in env - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} shell: bash run: | echo "CYPRESS_CONNECTOR_AUTH_FILE_PATH=${{ github.workspace }}/.github/test/creds.json" >> $GITHUB_ENV - name: Fetch keys - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} env: TOML_PATH: "./config/development.toml" run: | @@ -91,33 +91,33 @@ jobs: - name: Install mold linker uses: rui314/setup-mold@v1 - if: ${{ runner.os == 'Linux' && env.SKIP_STEP }} + if: ${{ runner.os == 'Linux' && env.SKIP_TESTS }} with: make-default: true - name: Install Rust - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} uses: dtolnay/rust-toolchain@master with: toolchain: stable 2 weeks ago components: clippy - name: Install sccache - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} uses: taiki-e/install-action@v2.41.10 with: tool: sccache checksum: true - name: Install cargo-nextest - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} uses: taiki-e/install-action@v2.41.10 with: tool: cargo-nextest checksum: true - name: Install Diesel CLI - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} uses: baptiste0928/cargo-install@v3.1.1 with: crate: diesel_cli @@ -142,18 +142,18 @@ jobs: cd - - name: Run database migrations - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} shell: bash env: DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db run: just migrate run --locked-schema - name: Build project - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} run: cargo build --package router --bin router - name: Setup Local Server - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} run: | # Start the server in the background target/debug/router & @@ -175,10 +175,10 @@ jobs: done - name: Run Cypress tests - if: ${{ env.SKIP_STEP }} + if: ${{ env.SKIP_TESTS }} env: CYPRESS_BASEURL: "http://localhost:8080" - shell: bash -leo pipefail {0} + shell: bash -leuo pipefail {0} run: | cd cypress-tests From 61058f66ea8003cd4c1502f4ea7868107e82bf2a Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sat, 28 Sep 2024 15:51:43 +0530 Subject: [PATCH 04/11] ci: reverse run conditions --- .github/workflows/cypress-tests-runner.yml | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index edf9e0f79d5..b14047ae9d2 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -16,7 +16,7 @@ env: CONNECTORS: stripe RUST_BACKTRACE: short RUSTUP_MAX_RETRIES: 10 - SKIP_TESTS: ${{ !((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) && !(github.event_name == 'merge_group')}} + RUN_TESTS: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}} DEBUG: cypress:cli RUST_MIN_STACK: 10485760 @@ -52,14 +52,14 @@ jobs: steps: - name: Skip tests for PRs from forks shell: bash - if: ${{ !env.SKIP_TESTS }} + if: ${{ !env.RUN_TESTS }} run: echo 'Skipping tests for PRs from forks' - name: Checkout repository uses: actions/checkout@v4 - name: Download Encrypted TOML from S3 and Decrypt - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} env: AWS_ACCESS_KEY_ID: ${{ secrets.CONNECTOR_CREDS_AWS_ACCESS_KEY_ID }} AWS_REGION: ${{ secrets.CONNECTOR_CREDS_AWS_REGION }} @@ -76,13 +76,13 @@ jobs: gpg --quiet --batch --yes --decrypt --passphrase="${CONNECTOR_AUTH_PASSPHRASE}" --output ".github/test/creds.json" ".github/secrets/${DESTINATION_FILE_NAME}" - name: Set paths in env - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} shell: bash run: | echo "CYPRESS_CONNECTOR_AUTH_FILE_PATH=${{ github.workspace }}/.github/test/creds.json" >> $GITHUB_ENV - name: Fetch keys - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} env: TOML_PATH: "./config/development.toml" run: | @@ -96,28 +96,28 @@ jobs: make-default: true - name: Install Rust - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} uses: dtolnay/rust-toolchain@master with: toolchain: stable 2 weeks ago components: clippy - name: Install sccache - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} uses: taiki-e/install-action@v2.41.10 with: tool: sccache checksum: true - name: Install cargo-nextest - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} uses: taiki-e/install-action@v2.41.10 with: tool: cargo-nextest checksum: true - name: Install Diesel CLI - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} uses: baptiste0928/cargo-install@v3.1.1 with: crate: diesel_cli @@ -142,18 +142,18 @@ jobs: cd - - name: Run database migrations - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} shell: bash env: DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db run: just migrate run --locked-schema - name: Build project - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} run: cargo build --package router --bin router - name: Setup Local Server - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} run: | # Start the server in the background target/debug/router & @@ -175,7 +175,7 @@ jobs: done - name: Run Cypress tests - if: ${{ env.SKIP_TESTS }} + if: ${{ env.RUN_TESTS }} env: CYPRESS_BASEURL: "http://localhost:8080" shell: bash -leuo pipefail {0} From 5620ad67aef8640dbfadf12ecda2588bef633d76 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:10:44 +0530 Subject: [PATCH 05/11] ci: re-format --- .github/workflows/cypress-tests-runner.yml | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index b14047ae9d2..d9573a27621 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -52,14 +52,14 @@ jobs: steps: - name: Skip tests for PRs from forks shell: bash - if: ${{ !env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'false' }} run: echo 'Skipping tests for PRs from forks' - name: Checkout repository uses: actions/checkout@v4 - name: Download Encrypted TOML from S3 and Decrypt - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.CONNECTOR_CREDS_AWS_ACCESS_KEY_ID }} AWS_REGION: ${{ secrets.CONNECTOR_CREDS_AWS_REGION }} @@ -76,13 +76,13 @@ jobs: gpg --quiet --batch --yes --decrypt --passphrase="${CONNECTOR_AUTH_PASSPHRASE}" --output ".github/test/creds.json" ".github/secrets/${DESTINATION_FILE_NAME}" - name: Set paths in env - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} shell: bash run: | echo "CYPRESS_CONNECTOR_AUTH_FILE_PATH=${{ github.workspace }}/.github/test/creds.json" >> $GITHUB_ENV - name: Fetch keys - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} env: TOML_PATH: "./config/development.toml" run: | @@ -90,34 +90,34 @@ jobs: echo "CYPRESS_ADMINAPIKEY=${LOCAL_ADMIN_API_KEY}" >> $GITHUB_ENV - name: Install mold linker + if: ${{ runner.os == 'Linux' && env.RUN_TESTS == 'true' }} uses: rui314/setup-mold@v1 - if: ${{ runner.os == 'Linux' && env.SKIP_TESTS }} with: make-default: true - name: Install Rust - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} uses: dtolnay/rust-toolchain@master with: toolchain: stable 2 weeks ago components: clippy - name: Install sccache - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} uses: taiki-e/install-action@v2.41.10 with: tool: sccache checksum: true - name: Install cargo-nextest - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} uses: taiki-e/install-action@v2.41.10 with: tool: cargo-nextest checksum: true - name: Install Diesel CLI - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} uses: baptiste0928/cargo-install@v3.1.1 with: crate: diesel_cli @@ -125,35 +125,38 @@ jobs: args: --no-default-features - name: Install Just - uses: baptiste0928/cargo-install@v3.1.1 + if: ${{ env.RUN_TESTS == 'true' }} + uses: taiki-e/install-action@v2.41.10 with: crate: just - name: Install Node.js + if: ${{ env.RUN_TESTS == 'true' }} uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install Cypress and dependencies + if: ${{ env.RUN_TESTS == 'true' }} run: | cd "cypress-tests" npm ci cd - - name: Run database migrations - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} shell: bash env: DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db run: just migrate run --locked-schema - name: Build project - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} run: cargo build --package router --bin router - name: Setup Local Server - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} run: | # Start the server in the background target/debug/router & @@ -175,7 +178,7 @@ jobs: done - name: Run Cypress tests - if: ${{ env.RUN_TESTS }} + if: ${{ env.RUN_TESTS == 'true' }} env: CYPRESS_BASEURL: "http://localhost:8080" shell: bash -leuo pipefail {0} From 5f1aff4515b518b2add3246d41fcb151706079e0 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:12:11 +0530 Subject: [PATCH 06/11] ci: this should work --- .github/workflows/cypress-tests-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index d9573a27621..d234ec78523 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -208,7 +208,7 @@ jobs: kill "${{ env.PID }}" - name: Upload Cypress test results - if: failure() + if: env.RUN_TESTS == 'true' && failure() uses: actions/upload-artifact@v4 with: name: cypress-test-results From 0d7a1762b169c1ff8194147a1aa9d51184f13f3d Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:12:26 +0530 Subject: [PATCH 07/11] ci: fkin nerd --- .github/workflows/cypress-tests-runner.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index d234ec78523..bd6c56029e0 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -140,9 +140,7 @@ jobs: - name: Install Cypress and dependencies if: ${{ env.RUN_TESTS == 'true' }} run: | - cd "cypress-tests" - npm ci - cd - + npm ci --prefix ./cypress-tests - name: Run database migrations if: ${{ env.RUN_TESTS == 'true' }} From 8b806257b81675de7accb47de9038c9cda422b71 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 10:36:16 +0530 Subject: [PATCH 08/11] ci: fix just --- .github/workflows/cypress-tests-runner.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index bd6c56029e0..819618ac0d3 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -128,7 +128,8 @@ jobs: if: ${{ env.RUN_TESTS == 'true' }} uses: taiki-e/install-action@v2.41.10 with: - crate: just + tool: just + checksum: true - name: Install Node.js if: ${{ env.RUN_TESTS == 'true' }} From a05b6c2993d8f6213e69c3a274faca6b8c87ac36 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:47:32 +0530 Subject: [PATCH 09/11] ci: add another check while checkout --- .github/workflows/cypress-tests-runner.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index 819618ac0d3..ecda902069d 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -56,6 +56,7 @@ jobs: run: echo 'Skipping tests for PRs from forks' - name: Checkout repository + if: ${{ env.RUN_TESTS == 'true' }} uses: actions/checkout@v4 - name: Download Encrypted TOML from S3 and Decrypt From 72ab88d4c866d6e1106fc81bbfe8d8896b0525c0 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:57:57 +0530 Subject: [PATCH 10/11] ci: restrict cargo build jobs to 4 for testing --- .github/workflows/cypress-tests-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index ecda902069d..3eb118f01d5 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -153,7 +153,7 @@ jobs: - name: Build project if: ${{ env.RUN_TESTS == 'true' }} - run: cargo build --package router --bin router + run: cargo build --package router --bin router --jobs 4 - name: Setup Local Server if: ${{ env.RUN_TESTS == 'true' }} From da622624c1b0723bc0673b25a1e7490c87955874 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Sun, 29 Sep 2024 17:37:19 +0530 Subject: [PATCH 11/11] ci: restrict cargo build jobs to 6 for testing --- .github/workflows/cypress-tests-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml index 3eb118f01d5..3a10dceb37e 100644 --- a/.github/workflows/cypress-tests-runner.yml +++ b/.github/workflows/cypress-tests-runner.yml @@ -153,7 +153,7 @@ jobs: - name: Build project if: ${{ env.RUN_TESTS == 'true' }} - run: cargo build --package router --bin router --jobs 4 + run: cargo build --package router --bin router --jobs 6 - name: Setup Local Server if: ${{ env.RUN_TESTS == 'true' }}