From 1369b38ef9a771397ecf73ce620198f08571177a Mon Sep 17 00:00:00 2001 From: Brandur Date: Sun, 19 Nov 2023 07:53:47 -0800 Subject: [PATCH] Add CI check to make sure River CLI is installable 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. --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9b4f511..a7661658 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,6 +109,28 @@ 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 + + - run: mkdir go_module + + - name: Install in Go module + run: go install github.com/riverqueue/river/cmd/river + working-directory: go_module + + - 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