@@ -32,32 +32,37 @@ jobs:
32
32
| sort \
33
33
| uniq > changed_samples.txt
34
34
if [ -s changed_samples.txt ]; then
35
+ echo "should_continue=true" >> $GITHUB_ENV
35
36
echo "The following samples have changed:"
36
37
cat changed_samples.txt
37
38
else
39
+ echo "should_continue=false" >> $GITHUB_ENV
38
40
echo "No samples have changed. Exiting..."
39
41
fi
40
-
41
42
- name : Install Golang
42
43
uses : actions/setup-go@v5
43
44
with :
44
45
go-version-file : tools/testing/go.mod
45
46
cache-dependency-path : |
46
47
tools/testing/go.sum
48
+ if : env.should_continue == 'true'
47
49
48
50
- name : Build the test tool using Go
49
51
run : |
50
52
go mod tidy
51
53
go build ./cmd/loadtest
52
54
working-directory : tools/testing/
55
+ if : env.should_continue == 'true'
53
56
54
57
- name : Install Defang
55
58
run : |
56
59
eval "$(curl -fsSL s.defang.io/install)"
60
+ if : env.should_continue == 'true'
57
61
58
62
- name : Run tests
59
63
id : run-tests
60
64
shell : bash # implies set -o pipefail, so pipe below will keep the exit code from loadtest
65
+ if : env.should_continue == 'true'
61
66
env :
62
67
FIXED_VERIFIER_PK : ${{ secrets.FIXED_VERIFIER_PK }}
63
68
TEST_AWS_ACCESS_KEY : ${{ secrets.TEST_AWS_ACCESS_KEY }}
@@ -92,16 +97,14 @@ jobs:
92
97
run : |
93
98
SAMPLES=$(sed 's|^samples/||' changed_samples.txt | paste -s -d ',' -)
94
99
echo "Running tests for samples: $SAMPLES"
95
-
96
100
mkdir output
97
101
# concurrency is set to 10 to avoid exhausting our fargate vCPU limits when running
98
102
# kaniko builds, which consume 4 vCPUs each. the limit is currently set to 60--6.5 of
99
103
# which are used to run the staging stack. So floor((60-6.5)/4) = 13 is our upper limit
100
104
./tools/testing/loadtest -c fabric-staging.defang.dev:443 --timeout=15m --concurrency=10 -s $SAMPLES -o output --markdown=true | tee output/summary.log | grep -v '^\s*[-*]' # removes load sample log lines
101
-
102
105
- name : Upload Output as Artifact
103
106
uses : actions/upload-artifact@v4
104
- if : success() || steps.run-tests.outcome == 'failure' # Always upload result unless cancelled
107
+ if : env.should_continue == 'true' && ( success() || steps.run-tests.outcome == 'failure') # Always upload result unless cancelled
105
108
with :
106
109
name : program-output
107
110
path : output/**
0 commit comments