Compare commits

...

18 Commits

Author SHA1 Message Date
Abin Simon
66ea3d6638 better cache key 2024-01-22 20:12:24 +05:30
Abin Simon
fbd3b79d96 this 2024-01-22 19:55:49 +05:30
Abin Simon
3182cbb4d9 simlified 2024-01-22 19:54:49 +05:30
Abin Simon
8a1d2ceeb9 fuller 2024-01-22 19:44:03 +05:30
Abin Simon
8caff5da01 figure it out 2024-01-22 19:40:36 +05:30
Abin Simon
c6cdd87780 env 2024-01-22 19:37:50 +05:30
Abin Simon
9856347b78 repeat 2024-01-22 19:32:03 +05:30
Abin Simon
ebe21472dc simlify 2024-01-22 17:27:53 +05:30
Abin Simon
765ba32b23 separate cache 2024-01-22 17:23:38 +05:30
Abin Simon
def7382220 idk 2024-01-22 15:05:13 +05:30
Abin Simon
450e270313 Just run one 2024-01-22 15:00:39 +05:30
Abin Simon
4de2a33b73 Fail after unit-tests 2024-01-22 14:41:39 +05:30
Abin Simon
0bdeb8f26c Ensure trusted runs 2024-01-22 11:06:09 +05:30
Abin Simon
36037c7905 Why 2024-01-22 11:06:09 +05:30
Abin Simon
b01bbd7414 Get me the testcache 2024-01-22 11:06:09 +05:30
Abin Simon
49af829cb9 Always write out logs 2024-01-22 11:06:08 +05:30
Abin Simon
3818b518f1 Add debugging for testcache 2024-01-22 11:06:08 +05:30
Abin Simon
1a85120e84 Make CI publish logs for successful runs 2024-01-22 11:06:07 +05:30

View File

@ -7,7 +7,7 @@ on:
pull_request:
push:
branches: [main]
branches: [main, ci-speedup]
tags: ["v*.*.*"]
repository_dispatch:
@ -130,7 +130,7 @@ jobs:
environment: Testing
runs-on: ubuntu-latest
timeout-minutes: 120
if: (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name == github.repository)
# if: (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name == github.repository)
defaults:
run:
working-directory: src
@ -188,7 +188,7 @@ 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@v4
with:
name: ci-test-log
@ -277,7 +277,7 @@ jobs:
run:
working-directory: src
env:
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-unit.log
CORSO_LOG_FILE: /tmp/corso-testlog/run-unit.log
LOG_GRAPH_REQUESTS: true
steps:
- uses: actions/checkout@v4
@ -286,12 +286,13 @@ jobs:
uses: magnetikonline/action-golang-cache@v4
with:
go-version-file: src/go.mod
cache-key-suffix: unit-test-${{ github.sha }}
- run: mkdir testlog
- run: mkdir -p /tmp/corso-testlog
# Install gotestfmt
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
# # Install gotestfmt
# - name: Set up gotestfmt
# run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
# run the tests
- name: Unit Tests
@ -302,6 +303,7 @@ jobs:
CORSO_SECONDARY_M365_TEST_USER_ID: 'foo'
run: |
set -euo pipefail
export GODEBUG=gocachetest=1
go test \
-tags testing \
-json \
@ -309,16 +311,34 @@ jobs:
-failfast \
-p 1 \
-timeout 20m \
./... \
2>&1 | tee ./testlog/gotest-unit.log | gotestfmt -hide successful-tests
./...
# run the tests
- name: Unit Tests Again
env:
# Set these to a bad value so we don't accidentally fall back to
# something elsewhere.
CORSO_M365_TEST_USER_ID: 'foo'
CORSO_SECONDARY_M365_TEST_USER_ID: 'foo'
run: |
set -euo pipefail
export GODEBUG=gocachetest=1
go test \
-tags testing \
-json \
-v \
-failfast \
-p 1 \
-timeout 20m \
./...
# Upload the original go test output as an artifact for later review.
- name: Upload test log
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-log
path: src/testlog/*
path: /tmp/corso-testlog/*
if-no-files-found: error
retention-days: 14