Skip to content

Merge pull request #185 from ngrok/fix-run-go-mod-tidy-again #457

Merge pull request #185 from ngrok/fix-run-go-mod-tidy-again

Merge pull request #185 from ngrok/fix-run-go-mod-tidy-again #457

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
NGROK_TEST_ONLINE: 1
NGROK_TEST_LONG: 1
NGROK_TEST_FLAKEY: 1
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- uses: HatsuneMiku3939/direnv-action@v1
- name: direnv allow
run: direnv allow .
- name: go mod tidy
run: direnv exec . go mod tidy
- name: exit if not tidy
run: |
git diff --exit-code go.mod
git diff --exit-code go.sum
- name: Build
run: direnv exec . go build -v ./...
- name: Build Examples
run: direnv exec . go build -v ./examples/...
- name: Test
run: direnv exec . go test -v ./...