Compare commits
18 Commits
main
...
ci-speedup
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66ea3d6638 | ||
|
|
fbd3b79d96 | ||
|
|
3182cbb4d9 | ||
|
|
8a1d2ceeb9 | ||
|
|
8caff5da01 | ||
|
|
c6cdd87780 | ||
|
|
9856347b78 | ||
|
|
ebe21472dc | ||
|
|
765ba32b23 | ||
|
|
def7382220 | ||
|
|
450e270313 | ||
|
|
4de2a33b73 | ||
|
|
0bdeb8f26c | ||
|
|
36037c7905 | ||
|
|
b01bbd7414 | ||
|
|
49af829cb9 | ||
|
|
3818b518f1 | ||
|
|
1a85120e84 |
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user