Skip to content

Commit afe184c

Browse files
authored
A few CI tweaks: env var for database name + better comment (#20)
A couple small changes based on what I'm bringing into Python in [1]: * An env var for database name in addition to URL. Makes it so all values are visible in one place right next to each other. * Improve comment to make it more clear why installing Go is required. [1] riverqueue/riverqueue-python#14
1 parent 0268cd2 commit afe184c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ env:
99
BIN_PATH: /home/runner/bin
1010

1111
# A suitable URL for a test database.
12-
TEST_DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/riverqueue_ruby_test?sslmode=disable
12+
TEST_DATABASE_NAME: river_test
13+
TEST_DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/river_test?sslmode=disable
1314

1415
on:
1516
- push
@@ -120,16 +121,16 @@ jobs:
120121
ruby-version: "head"
121122
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
122123

123-
# There is a version of Go on Actions' base image, but it's old and can't
124-
# read modern `go.mod` annotations correctly.
124+
# Needed for River's CLI. There is a version of Go on Actions' base image,
125+
# but it's old and can't read modern `go.mod` annotations correctly.
125126
- name: Install Go
126127
uses: actions/setup-go@v5
127128
with:
128129
go-version: "stable"
129130
check-latest: true
130131

131132
- name: Create database
132-
run: psql --echo-errors --quiet -c '\timing off' -c "CREATE DATABASE riverqueue_ruby_test;" ${ADMIN_DATABASE_URL}
133+
run: psql --echo-errors --quiet -c '\timing off' -c "CREATE DATABASE ${TEST_DATABASE_NAME};" ${ADMIN_DATABASE_URL}
133134

134135
- name: Install River CLI
135136
run: go install github.com/riverqueue/river/cmd/river@latest

0 commit comments

Comments
 (0)