Skip to content

Commit

Permalink
Add CI check to make sure River CLI is installable
Browse files Browse the repository at this point in the history
Pertaining to the problem described in #35, seems like a good idea to
have a CI check make sure that nothing we've done with Go modules has
made the CLI not installable.
  • Loading branch information
brandur committed Nov 19, 2023
1 parent eb228bb commit c476ff7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,38 @@ jobs:
- name: river migrate-down
run: ./river migrate-down --database-url $DATABASE_URL --max-steps 100

cli_installable:
runs-on: ubuntu-latest
timeout-minutes: 3

steps:
- uses: actions/setup-go@v4
with:
go-version: "stable"
check-latest: true

- name: Make Go Module directory
run: mkdir go_module

- name: Initialize Go module
run: go mod init github.com/riverqueue/rivertest
working-directory: go_module

- name: Add River as dependency
run: go get github.com/riverqueue/river@${GITHUB_REF#refs/heads/}
working-directory: go_module

- name: Install in Go module
run: go install github.com/riverqueue/river/cmd/river
working-directory: go_module

- name: Make not Go Module directory
run: mkdir not_go_module

- name: Install in _not_ Go module (with ref)
run: go install github.com/riverqueue/river/cmd/river@${GITHUB_REF#refs/heads/}
working-directory: not_go_module

golangci:
name: lint
runs-on: ubuntu-latest
Expand Down

0 comments on commit c476ff7

Please sign in to comment.