check ci.yml logging artifacts (#3434)

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment

#### Test Plan

- [x] 💚 E2E
This commit is contained in:
Keepers 2023-05-17 16:43:48 -06:00 committed by GitHub
parent c04ce88d9e
commit 7f3c38a626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 14 deletions

View File

@ -137,6 +137,8 @@ jobs:
AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }}
AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }}
CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }}
CORSO_LOG_FILE: ./src/testlog/suite-testlogging.log
LOG_GRAPH_REQUESTS: true
steps:
- uses: actions/checkout@v3
@ -169,8 +171,6 @@ jobs:
CORSO_M365_TEST_USER_ID: ${{ vars.CORSO_M365_TEST_USER_ID }}
CORSO_SECONDARY_M365_TEST_USER_ID: ${{ vars.CORSO_SECONDARY_M365_TEST_USER_ID }}
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
CORSO_LOG_FILE: ./src/testlog/testlogging.log
LOG_GRAPH_REQUESTS: true
run: |
set -euo pipefail
go test \
@ -180,14 +180,15 @@ jobs:
-failfast \
-p 1 \
-timeout 15m \
./... 2>&1 | tee ./testlog/gotest.log | gotestfmt -hide successful-tests
./... \
2>&1 | tee ./testlog/gotest.log | gotestfmt -hide successful-tests
# Upload the original go test output as an artifact for later review.
- name: Upload test log
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-log
name: ci-test-log
path: src/testlog/*
if-no-files-found: error
retention-days: 14
@ -200,6 +201,9 @@ jobs:
defaults:
run:
working-directory: src
env:
CORSO_LOG_FILE: ./src/testlog/unit-testlogging.log
LOG_GRAPH_REQUESTS: true
steps:
- uses: actions/checkout@v3
@ -221,8 +225,6 @@ jobs:
# something elsewhere.
CORSO_M365_TEST_USER_ID: 'foo'
CORSO_SECONDARY_M365_TEST_USER_ID: 'foo'
CORSO_LOG_FILE: ./src/testlog/testlogging.log
LOG_GRAPH_REQUESTS: true
run: |
set -euo pipefail
go test \
@ -232,7 +234,8 @@ jobs:
-failfast \
-p 1 \
-timeout 15m \
./... 2>&1 | tee ./testlog/gotest-unit.log | gotestfmt -hide successful-tests
./... \
2>&1 | tee ./testlog/gotest-unit.log | gotestfmt -hide successful-tests
# Upload the original go test output as an artifact for later review.
- name: Upload test log
@ -252,6 +255,9 @@ jobs:
defaults:
run:
working-directory: src
env:
CORSO_LOG_FILE: ./src/testlog/fork-testlogging.log
LOG_GRAPH_REQUESTS: true
steps:
- name: Fail check if not repository_dispatch
if: github.event_name != 'repository_dispatch'
@ -311,21 +317,21 @@ jobs:
CORSO_CI_TESTS: true
CORSO_M365_TEST_USER_ID: ${{ vars.CORSO_M365_TEST_USER_ID }}
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
CORSO_LOG_FILE: ./src/testlog/testlogging.log
run: |
set -euo pipefail
go test \
-json \
-v \
-timeout 15m \
./... 2>&1 | tee ./testlog/gotest.log | gotestfmt -hide successful-tests
./... \
2>&1 | tee ./testlog/gotest.log | gotestfmt -hide successful-tests
# Upload the original go test log as an artifact for later review.
- name: Upload test log
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-log
name: fork-test-log
path: src/testlog/*
if-no-files-found: error
retention-days: 14
@ -333,7 +339,7 @@ jobs:
# Update check run called "Test-Suite-Fork"
- uses: actions/github-script@v6
id: update-check-run
if: ${{ always() }}
if: failure()
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}

View File

@ -140,10 +140,10 @@ jobs:
# Upload the original go test output as an artifact for later review.
- name: Upload test log
if: failure()
if: always()
uses: actions/upload-artifact@v3
with:
name: test-log
name: nightly-test-log
path: src/testlog/*
if-no-files-found: error
retention-days: 14

View File

@ -321,7 +321,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v3
with:
name: "test-logs"
name: sanity-test-log
path: ${{ env.WORKING_DIR }}/${{ env.CORSO_LOG_DIR }}/
if-no-files-found: error
retention-days: 14