File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 33
33
- name : Checkout code
34
34
uses : actions/checkout@v4
35
35
with : { 'fetch-depth': 0 }
36
- - name : Install unzip
37
- run : apt-get update && apt-get install -y unzip
36
+
37
+ - name : Install unzip (for tests) and zstd (for faster caching)
38
+ run : apt-get update && apt-get install -y unzip zstd
39
+
40
+ - name : Restore .build
41
+ if : ${{ !(github.run_attempt > 1) }} # Because maybe the cache is causing issues
42
+ id : " restore-cache"
43
+ uses : actions/cache/restore@v4
44
+ with :
45
+ path : .build
46
+ key : " spi-query-performance-build-${{ runner.os }}-${{ github.event.after }}"
47
+ restore-keys : " spi-query-performance-build-${{ runner.os }}-"
48
+
49
+ - name : Build tests
50
+ run : cp .env.testing.template .env.testing && make build-tests
51
+
52
+ - name : Cache .build
53
+ if : steps.restore-cache.outputs.cache-hit != 'true'
54
+ uses : actions/cache/save@v4
55
+ with :
56
+ path : .build
57
+ key : " spi-query-performance-build-${{ runner.os }}-${{ github.event.after }}"
58
+
38
59
- name : Run tests
39
60
run : |
40
61
echo "
45
66
DATABASE_USE_TLS=true
46
67
DATABASE_USERNAME=spi_dev
47
68
" >> .env.staging
48
- make test -query-performance
69
+ make run -query-performance-tests
Original file line number Diff line number Diff line change @@ -49,16 +49,19 @@ run-tests: xcbeautify
49
49
50
50
test : build-tests run-tests
51
51
52
- test -query-performance: xcbeautify
52
+ run -query-performance-tests :
53
53
set -o pipefail \
54
54
&& env RUN_QUERY_PERFORMANCE_TESTS=true \
55
- swift test --disable-automatic-resolution \
55
+ swift test --skip-build \
56
+ --disable-automatic-resolution \
56
57
--enable-experimental-prebuilts \
57
58
--filter QueryPerformanceTests \
58
59
2>&1 | tee test.log
59
60
grep " ℹ️" test.log
60
61
grep -v " \] Compiling" test.log | ./xcbeautify --renderer github-actions
61
62
63
+ test-query-performance : build-tests run-query-performance-tests
64
+
62
65
test-fast :
63
66
@echo Skipping image snapshot tests
64
67
@echo Running without --sanitize=thread
You can’t perform that action at this time.
0 commit comments