make same changes to retention tests

This commit is contained in:
HiteshRepo 2024-01-29 10:34:46 +05:30
parent df2753428b
commit 9c0d8fc46c

View File

@ -209,21 +209,28 @@ jobs:
AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }} AZURE_CLIENT_ID_NAME: ${{ needs.SetM365App.outputs.client_id_env }}
AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }} AZURE_CLIENT_SECRET_NAME: ${{ needs.SetM365App.outputs.client_secret_env }}
CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }} CLIENT_APP_SLOT: ${{ needs.SetM365App.outputs.client_app_slot }}
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-ci-retention.log CORSO_LOG_FILE: /tmp/corso-testlog/run-ci-retention.log
LOG_GRAPH_REQUESTS: true LOG_GRAPH_REQUESTS: true
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Golang with cache - name: Setup Golang
uses: magnetikonline/action-golang-cache@v4 uses: actions/setup-go@v5
with: with:
go-version-file: src/go.mod go-version: 1.21
cache: true
- run: mkdir testlog - name: Setup Golang caches
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ github.sha }}
restore-keys: |
${{ runner.os }}-golang-
# Install gotestfmt - run: mkdir -p /tmp/corso-testlog
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
# AWS creds # AWS creds
- name: Configure AWS credentials from Test account - name: Configure AWS credentials from Test account
@ -254,15 +261,15 @@ jobs:
-p 1 \ -p 1 \
-timeout 10m \ -timeout 10m \
./... \ ./... \
2>&1 | tee ./testlog/gotest-ci.log | gotestfmt -hide successful-tests 2>&1 | tee /tmp/corso-testlog/gotest-ci.log
# Upload the original go test output as an artifact for later review. # Upload the original go test output as an artifact for later review.
- name: Upload test log - name: Upload test log
if: failure() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ci-retention-test-log name: ci-retention-test-log
path: src/testlog/* path: /tmp/corso-testlog/*
if-no-files-found: error if-no-files-found: error
retention-days: 14 retention-days: 14