ci: run load benchmark #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- '**' | |
- '!dependabot/**' | |
tags: | |
- '**' | |
pull_request: | |
jobs: | |
test: | |
name: "Ruby ${{ matrix.ruby-version }}: ${{ matrix.runs-on }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: | |
- "3.2" | |
- "3.3" | |
- "3.4" | |
runs-on: | |
# - macos-latest | |
- ubuntu-latest | |
# - windows-latest | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
# We can't use "bundler-cache: true" with ruby/setup-ruby | |
# because it doesn't cache dependencies installed by | |
# rubygems-requirements-system automatically. | |
- name: Install dependencies | |
run: | | |
MAKEFLAGS="-j$(nproc)" bundle install --jobs=$(nproc) | |
- name: Prepare test environment | |
run: | | |
sudo apt install -y -V \ | |
libadbc-driver-postgresql-dev \ | |
libadbc-driver-sqlite-dev \ | |
postgresql | |
sudo systemctl restart postgresql | |
sudo -u postgres -H psql -c "CREATE ROLE ${USER} SUPERUSER LOGIN;" | |
- name: "Test: SQLite3" | |
run: | | |
bundle exec rake | |
- name: "Test: PostgreSQL" | |
env: | |
ACTIVERECORD_ADBC_ADAPTER_BACKEND: postgresql | |
run: | | |
bundle exec rake | |
- name: Benchmark | |
run: | | |
bundle exec benchmark/load.rb |