Skip to content

Commit 70551b9

Browse files
committed
Add spec/pg_spec.rb to tests
.. which wasn't tested in CI. We could use `rake test` instead, but it starts a separate `rspec` process, which doesn't respect our early load `-rpg`. Instead it uses the git checkout for lib files and not the files installed from the native binary gem. This in turn doesn't set POSTGRESQL_LIB_PATH correctly.
1 parent 35b2704 commit 70551b9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/binary-gems.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ jobs:
142142
- run: echo $env:PATH
143143
- name: Run specs
144144
if: ${{ matrix.os != 'windows-latest' }}
145-
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
145+
run: ruby -rpg -S rspec -fd spec/*_spec.rb spec/**/*_spec.rb
146146
- name: Run specs
147147
if: ${{ matrix.os == 'windows-latest' }}
148148
run: |
149149
ridk enable
150-
ruby -rpg -S rspec -fd spec/**/*_spec.rb
150+
ruby -rpg -S rspec -fd spec/*_spec.rb spec/**/*_spec.rb
151151
152152
- name: Print logs if job failed
153153
if: ${{ failure() && matrix.os == 'windows-latest' }}

.github/workflows/source-gem.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
PG_DEBUG: 0
148148
# Temprary fix only for Truffleruby-24.0.0:
149149
TRUFFLERUBYOPT: --experimental-options --keep-handles-alive
150-
run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
150+
run: ruby -rpg -S rspec spec/*_spec.rb spec/**/*_spec.rb -cfdoc
151151

152152
- name: Print db logs if job failed
153153
if: ${{ failure() && matrix.os == 'windows' }}

spec/env/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ CMD ruby -v && \
2525
bundle config set --local without 'development' && \
2626
bundle install && \
2727
sudo -u postgres ruby -rpg -e "p RUBY_DESCRIPTION, PG::VERSION, PG::POSTGRESQL_LIB_PATH, PG::IS_BINARY_GEM, PG::BUNDLED_LIBPQ_WITH_UNIXSOCKET; puts PG.connect.exec('SELECT version()').values; p PG.connect.host" && \
28-
sudo -u postgres ruby -rpg -S rspec -fd spec/**/*_spec.rb
28+
sudo -u postgres ruby -rpg -S rspec -fd spec/*_spec.rb spec/**/*_spec.rb

spec/env/Dockerfile.centos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ CMD ruby -v && \
2424
bundle config set --local without 'development' && \
2525
bundle install && \
2626
sudo -u postgres ruby -rpg -e "p RUBY_DESCRIPTION, PG::VERSION, PG::POSTGRESQL_LIB_PATH, PG::IS_BINARY_GEM, PG::BUNDLED_LIBPQ_WITH_UNIXSOCKET; puts PG.connect.exec('SELECT version()').values; p PG.connect.host" && \
27-
sudo -u postgres ruby -rpg -S rspec -fd spec/**/*_spec.rb
27+
sudo -u postgres ruby -rpg -S rspec -fd spec/*_spec.rb spec/**/*_spec.rb

0 commit comments

Comments
 (0)