Skip to content

Commit

Permalink
A few CI tweaks: env var for database name + better comment (#20)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
brandur authored Jul 4, 2024
1 parent 0268cd2 commit afe184c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ env:
BIN_PATH: /home/runner/bin

# A suitable URL for a test database.
TEST_DATABASE_URL: postgres://postgres:[email protected]:5432/riverqueue_ruby_test?sslmode=disable
TEST_DATABASE_NAME: river_test
TEST_DATABASE_URL: postgres://postgres:[email protected]:5432/river_test?sslmode=disable

on:
- push
Expand Down Expand Up @@ -120,16 +121,16 @@ jobs:
ruby-version: "head"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

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

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

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

0 comments on commit afe184c

Please sign in to comment.