Skip to content

Merge pull request #3853 from SwiftPackageIndex/dependabot/npm_and_ya… #5954

Merge pull request #3853 from SwiftPackageIndex/dependabot/npm_and_ya…

Merge pull request #3853 from SwiftPackageIndex/dependabot/npm_and_ya… #5954

# Copyright Dave Verwer, Sven A. Schmidt, and other contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Query Performance Test
on:
workflow_dispatch:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-linux:
name: Query Performance Test
runs-on: ubuntu-latest
continue-on-error: true
container:
image: registry.gitlab.com/finestructure/spi-base:2.1.0
steps:
- name: Checkout code
uses: actions/checkout@v4
with: { 'fetch-depth': 0 }
- name: Install unzip (for tests) and zstd (for faster caching)
run: apt-get update && apt-get install -y unzip zstd
- name: Restore .build
if: ${{ !(github.run_attempt > 1) }} # Because maybe the cache is causing issues
id: "restore-cache"
uses: actions/cache/restore@v4
with:
path: .build
key: "spi-query-performance-build-${{ runner.os }}-${{ github.event.after }}"
restore-keys: "spi-query-performance-build-${{ runner.os }}-"
- name: Build tests
run: cp .env.testing.template .env.testing && make build-tests
- name: Cache .build
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: .build
key: "spi-query-performance-build-${{ runner.os }}-${{ github.event.after }}"
- name: Run tests
run: |
echo "
DATABASE_HOST=${{ secrets.STAGING_DATABASE_HOST }}
DATABASE_NAME=spi_dev
DATABASE_PASSWORD=${{ secrets.STAGING_DATABASE_PASSWORD }}
DATABASE_PORT=5432
DATABASE_USE_TLS=true
DATABASE_USERNAME=spi_dev
" >> .env.staging
make run-query-performance-tests