Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ jobs:
strategy:
matrix:
include:
- ruby-version: '2.5.0'
# HACK: Using '2.5' instead of '2.5.0' to let setup-ruby resolve a
# pre-built binary with a patched RubyGems. Ruby 2.5.0's bundled
# RubyGems ~2.7 cannot locate Bundler after installation on current
# GitHub-hosted runners, causing "can't find gem bundler" failures.
- ruby-version: '2.5'
database-adapter: 'mysql2'
database-user: 'root'
database-password: 'root'
database-port: '3306'
docker-compose-file: 'docker-compose.ci.mysql.yml'
java-version: '8'
java-distribution: 'adopt'
- ruby-version: '2.5.0'
- ruby-version: '2.5'
database-adapter: 'postgresql'
database-user: 'postgres'
database-password: 'postgres'
Expand All @@ -46,7 +50,7 @@ jobs:
java-distribution: 'adopt'
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -76,10 +80,19 @@ jobs:
set -e
- name: Wait for PostgreSQL
if: ${{ matrix.docker-compose-file == 'docker-compose.ci.postgresql.yml' }}
# Using pg_isready instead of psql -l because when psql runs with -l,
# the binary internally generates and executes a SQL query against the
# pg_database system catalog. In psql client v15+, that internal query
# references pg_database.daticulocale — a column added in PostgreSQL 15.
# When the newer client (installed on the runner) connects to an older
# server (<=14, running in Docker), the column does not exist, causing
# "column d.daticulocale does not exist" errors. This makes psql -l
# always fail even when the server is healthy and accepting connections.
# pg_isready does a simple connection probe without catalog queries.
run: |
set +e
count=0
until $(psql -h 127.0.0.1 -U postgres -p 5432 -l > /dev/null); do
until pg_isready -h 127.0.0.1 -p 5432 -U postgres; do
if [[ "$count" == "25" ]]; then
exit 1
fi
Expand Down Expand Up @@ -226,7 +239,7 @@ jobs:
docker logs -t --details it-db-1 || true
echo "::endgroup::"
- name: Upload logs
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v4
if: failure()
with:
name: killbill-${{ matrix.docker-compose-file }}.txt
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5.0
# HACK: Using '2.5' instead of '2.5.0' to let setup-ruby resolve a
# pre-built binary with a patched RubyGems. Ruby 2.5.0's bundled
# RubyGems ~2.7 cannot locate Bundler after installation on current
# GitHub-hosted runners, causing "can't find gem bundler" failures.
ruby-version: '2.5'
- name: Install gems
run: |
bundle config path vendor/bundle
Expand Down