diff --git a/.github/actions/deploy-test-reports/action.yml b/.github/actions/deploy-test-reports/action.yml index fc24b8dd61..bde66650d1 100644 --- a/.github/actions/deploy-test-reports/action.yml +++ b/.github/actions/deploy-test-reports/action.yml @@ -6,6 +6,10 @@ inputs: description: Group matching the artifacts required: false default: '*' + path: + description: Path for link to the report + required: false + default: '' AWS_BUCKET_NAME_TEST: required: true @@ -46,4 +50,9 @@ runs: aws s3 cp public/ s3://${AWS_BUCKET_NAME_TEST}/public/${SUB_PATH} --recursive + - name: Add link to report in the workflow summary + shell: bash + run: | + link="${{ inputs.path }}/index.html" + echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tests-backend.yml b/.github/workflows/tests-backend.yml index 027c38afef..12468b1577 100644 --- a/.github/workflows/tests-backend.yml +++ b/.github/workflows/tests-backend.yml @@ -51,6 +51,7 @@ jobs: curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - name: Unit tests API + timeout-minutes: 20 run: yarn --cwd redisinsight/api/ test:cov --ci --silent - name: Upload Test Report @@ -60,24 +61,20 @@ jobs: name: ${{ env.REPORT_NAME }} path: redisinsight/api/report + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tests-e2e-appimage.yml b/.github/workflows/tests-e2e-appimage.yml index 5da4e70536..dc805e4c3e 100644 --- a/.github/workflows/tests-e2e-appimage.yml +++ b/.github/workflows/tests-e2e-appimage.yml @@ -76,6 +76,7 @@ jobs: fluxbox & - name: Run tests + timeout-minutes: 60 run: | .github/e2e/test.app-image.sh @@ -103,26 +104,20 @@ jobs: list-suites: 'failed' fail-on-error: 'false' + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + # Deploy report to AWS test bucket - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY - diff --git a/.github/workflows/tests-e2e-docker.yml b/.github/workflows/tests-e2e-docker.yml index 21a514b39f..cdc22c733f 100644 --- a/.github/workflows/tests-e2e-docker.yml +++ b/.github/workflows/tests-e2e-docker.yml @@ -37,11 +37,15 @@ jobs: fail-fast: false matrix: # Number of threads to run tests - parallel: [0, 1, 2, 3] + parallel: [0, 1, 2, 3, 4, 5] steps: - uses: actions/checkout@v4 + - name: Get current date + id: date + uses: ./.github/actions/get-current-date + # SSH Debug - name: Enable SSH uses: mxschmitt/action-tmate@v3 @@ -62,7 +66,7 @@ jobs: - name: Generate short list of the test files working-directory: ./tests/e2e run: | - testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 4 == ${{ matrix.parallel }}") + testFiles=$(find tests/web -type f -name '*.e2e.ts' | sort | awk "NR % 6 == ${{ matrix.parallel }}") echo $testFiles @@ -72,6 +76,7 @@ jobs: echo "EOF" >> $GITHUB_ENV - name: Run tests + timeout-minutes: 80 run: | export NODE_INDEX=${{ matrix.parallel }} @@ -112,18 +117,10 @@ jobs: uses: ./.github/actions/deploy-test-reports with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Add link to report in the workflow summary - if: always() - run: | - DATE=$(date +'%Y-%m-%d') - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${DATE}/${{ github.run_id }}/${{ env.REPORT_NAME }}-${{ matrix.parallel }}/index.html" - - echo "- [${link}](${link})" >> $GITHUB_STEP_SUMMARY - - diff --git a/.github/workflows/tests-frontend.yml b/.github/workflows/tests-frontend.yml index 2080bacdc8..b7669e3acd 100644 --- a/.github/workflows/tests-frontend.yml +++ b/.github/workflows/tests-frontend.yml @@ -49,6 +49,7 @@ jobs: curl -H "Content-type: application/json" --data @$WORKDIR/slack.$FILENAME -H "Authorization: Bearer $SLACK_AUDIT_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage - name: Unit tests UI + timeout-minutes: 30 run: yarn test:cov --ci --silent - name: Upload Test Report @@ -58,24 +59,19 @@ jobs: name: ${{ env.REPORT_NAME }} path: report + - name: Get current date + id: date + if: always() + uses: ./.github/actions/get-current-date + - name: Deploy report uses: ./.github/actions/deploy-test-reports if: always() with: group: 'report' + path: "${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}" AWS_BUCKET_NAME_TEST: ${{ vars.AWS_BUCKET_NAME_TEST }} AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - - name: Get current date - id: date - if: always() - uses: ./.github/actions/get-current-date - - - name: Add link to report in the workflow summary - if: always() - run: | - link="${{ vars.DEFAULT_TEST_REPORTS_URL }}/${{ steps.date.outputs.date }}/${{ github.run_id }}/${{ env.REPORT_NAME }}/index.html" - echo "[${link}](${link})" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index db9a13e34f..ea561ef5d3 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -115,6 +115,7 @@ jobs: docker image load -i ./release/docker/docker-linux-alpine.amd64.tar - name: Run tests + timeout-minutes: 20 run: | if [ ${{ inputs.redis_client }} == "node-redis" ]; then export RI_REDIS_CLIENTS_FORCE_STRATEGY=${{ inputs.redis_client }} diff --git a/tests/e2e/docker.web.docker-compose.yml b/tests/e2e/docker.web.docker-compose.yml index 8e9280a8d9..be7bdc84b3 100644 --- a/tests/e2e/docker.web.docker-compose.yml +++ b/tests/e2e/docker.web.docker-compose.yml @@ -30,7 +30,7 @@ services: E2E_CLOUD_API_SECRET_KEY: $E2E_CLOUD_API_SECRET_KEY REMOTE_FOLDER_PATH: "/root/remote" command: [ - './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '120', + './wait-for-it.sh', 'redis-enterprise:12000', '-s', '-t', '240', '--', 'npm', 'run', 'test:chrome:ci' ] diff --git a/tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh b/tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh similarity index 96% rename from tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh rename to tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh index 35203fadd2..a21401b4df 100644 --- a/tests/e2e/rte/oss-cluster-7-rs/cluster-create.sh +++ b/tests/e2e/rte/oss-cluster-7-rs/cluster-rs-create.sh @@ -1,7 +1,7 @@ #!/bin/sh echo 'Try to sleep for a while...' -sleep 5 +sleep 25 echo 'Creating cluster...' echo "yes" | redis-cli \ --cluster create \ diff --git a/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile b/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile index 1d71491a8d..24762ba80e 100644 --- a/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile +++ b/tests/e2e/rte/oss-cluster-7-rs/creator.Dockerfile @@ -2,8 +2,8 @@ FROM redis:7.0.6 USER root -COPY cluster-create.sh ./ +COPY cluster-rs-create.sh ./ -RUN chmod a+x cluster-create.sh +RUN chmod a+x cluster-rs-create.sh -CMD ["/bin/sh", "./cluster-create.sh"] +CMD ["/bin/sh", "./cluster-rs-create.sh"] diff --git a/tests/e2e/rte/oss-cluster-7/cluster-create.sh b/tests/e2e/rte/oss-cluster-7/cluster-create.sh index 4c5f86da66..5456f68479 100644 --- a/tests/e2e/rte/oss-cluster-7/cluster-create.sh +++ b/tests/e2e/rte/oss-cluster-7/cluster-create.sh @@ -1,7 +1,7 @@ #!/bin/sh echo 'Try to sleep for a while...' -sleep 5 +sleep 25 echo 'Creating cluster...' echo "yes" | redis-cli \ --cluster create \ diff --git a/tests/e2e/web.runner.ci.ts b/tests/e2e/web.runner.ci.ts index 8e06c7fba8..4cc77995b9 100644 --- a/tests/e2e/web.runner.ci.ts +++ b/tests/e2e/web.runner.ci.ts @@ -11,7 +11,7 @@ import testcafe from 'testcafe'; experimentalDecorators: true } }) .src((process.env.TEST_FILES || 'tests/web/**/*.e2e.ts').split('\n')) - .browsers(['chromium:headless --disable-search-engine-choice-screen --ignore-certificate-errors']) + .browsers(['chromium:headless --disable-search-engine-choice-screen --ignore-certificate-errors --disable-dev-shm-usage --no-sandbox']) .screenshots({ path: 'report/screenshots/', takeOnFails: true,