Merge pull request #134 from kartverket/dependabot/go_modules/github.… #239
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test PR | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
test: | |
name: Build and run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout latest code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>=1.23.2' | |
check-latest: true | |
- uses: actions/cache@v4 # ratchet:actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build binary | |
run: | | |
go build | |
- name: install ginkgo | |
run: | | |
go install github.com/onsi/ginkgo/v2/ginkgo@latest | |
- name: Run tests | |
run: | | |
ginkgo ./... |