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 3333 - name : Checkout code
3434 uses : actions/checkout@v4
3535 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+
3859 - name : Run tests
3960 run : |
4061 echo "
4566 DATABASE_USE_TLS=true
4667 DATABASE_USERNAME=spi_dev
4768 " >> .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
4949
5050test : build-tests run-tests
5151
52- test -query-performance: xcbeautify
52+ run -query-performance-tests :
5353 set -o pipefail \
5454 && env RUN_QUERY_PERFORMANCE_TESTS=true \
55- swift test --disable-automatic-resolution \
55+ swift test --skip-build \
56+ --disable-automatic-resolution \
5657 --enable-experimental-prebuilts \
5758 --filter QueryPerformanceTests \
5859 2>&1 | tee test.log
5960 grep " ℹ️" test.log
6061 grep -v " \] Compiling" test.log | ./xcbeautify --renderer github-actions
6162
63+ test-query-performance : build-tests run-query-performance-tests
64+
6265test-fast :
6366 @echo Skipping image snapshot tests
6467 @echo Running without --sanitize=thread
You can’t perform that action at this time.
0 commit comments