From f0431f5948199249591ae61072aab6d6934d8259 Mon Sep 17 00:00:00 2001 From: elasticspoon Date: Tue, 21 May 2024 16:03:04 -0400 Subject: [PATCH] fix: ci fix tests off fork --- .github/workflows/combine_and_report.yml | 12 ++++++++---- .github/workflows/rspec_parallel.yml | 17 ++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/combine_and_report.yml b/.github/workflows/combine_and_report.yml index d72f77836a..b6598e79ee 100644 --- a/.github/workflows/combine_and_report.yml +++ b/.github/workflows/combine_and_report.yml @@ -3,26 +3,30 @@ on: jobs: combine_and_report: runs-on: ubuntu-latest + env: + AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} + AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }} + STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }} steps: - name: Checkout Project uses: actions/checkout@v4 + - name: Download artifacts uses: actions/download-artifact@v4 with: path: artifacts + - name: Decompress chunk test reports run: | find artifacts -name "test_reports*.zip" -exec unzip -d test_reports {} \; find test_reports -name "**/test_reports*.zip" -exec unzip -d test_reports {} \; + - name: Merge parallel runtime log parts if: env.AZURE_STORAGE_KEY != '' run: | cat artifacts/**/parallel_runtime_rspec*.log > parallel_runtime.log + - name: Upload log file to Azure Blob Storage - env: - AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} - AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }} - STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }} if: env.AZURE_STORAGE_KEY != '' run: | az storage blob upload \ diff --git a/.github/workflows/rspec_parallel.yml b/.github/workflows/rspec_parallel.yml index e706cc6952..c0c6e1f6bd 100644 --- a/.github/workflows/rspec_parallel.yml +++ b/.github/workflows/rspec_parallel.yml @@ -15,6 +15,9 @@ on: env: GROUPS_COMMA: ${{ join(fromJSON(inputs.groups), ',') }} GROUPS_UNDERSCORE: ${{ join(fromJSON(inputs.groups), '_') }} + AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} + AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }} + STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }} jobs: rspec_parallel: @@ -42,10 +45,6 @@ jobs: - uses: actions/checkout@v4 - name: Download parallel runtime log from Azure Blob Storage - env: - AZURE_STORAGE_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} - AZURE_STORAGE_ACCOUNT: ${{ secrets.ACCOUNT_NAME }} - STORAGE_CONTAINER: ${{ secrets.STORAGE_CONTAINER }} if: env.AZURE_STORAGE_KEY != '' run: | az storage blob download \ @@ -104,9 +103,9 @@ jobs: CC_TEST_REPORTER_ID: 31464536e34ab26588cb951d0fa6b5898abdf401dbe912fd47274df298e432ac continue-on-error: true run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build + # curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + # chmod +x ./cc-test-reporter + # ./cc-test-reporter before-build RUBYOPT='-W:no-deprecated -W:no-experimental' bundle exec parallel_rspec \ -n "${CI_TOTAL_JOBS}" \ @@ -114,8 +113,8 @@ jobs: --runtime-log old_parallel_runtime.log \ --verbose ./spec - echo 'Tests completed. Uploading to Code Climate' - ./cc-test-reporter after-build --exit-code $? + # echo 'Tests completed. Uploading to Code Climate' + # ./cc-test-reporter after-build --exit-code $? cat tmp/spec_summary.log - name: Compress reports