go.mod: update dependencies #279
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: tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Build, lint and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
path: './src/github.com/kevinburke/rickover' | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.x | |
# staticcheck needs this for GOPATH | |
- run: echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- run: echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV | |
- uses: actions/cache@master | |
with: | |
path: /go/bin | |
key: ${{ runner.os }}-gobin-v1-${{ hashFiles('**/Gopkg.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gobin-v1- | |
- uses: actions/cache@master | |
with: | |
path: /github/home/.cache | |
key: ${{ runner.os }}-go-v1-${{ hashFiles('**/Gopkg.lock') }} | |
restore-keys: | | |
${{ runner.os }}-go-v1- | |
- name: install envdir | |
run: go install github.com/kevinburke/envdir@latest | |
- name: Start Postgres, install Goose, migrate database | |
working-directory: ./src/github.com/kevinburke/rickover | |
run: | | |
make goose | |
envdir envs/github make migrate-ci | |
- name: Lint | |
working-directory: ./src/github.com/kevinburke/rickover | |
run: | | |
make staticcheck | |
envdir envs/github make lint | |
- name: Test rickover | |
# github env has correct database URL | |
run: envdir envs/github go test -p=1 -race -timeout 10s ./... | |
working-directory: ./src/github.com/kevinburke/rickover | |
- name: Run benchmarks | |
run: envdir envs/github make benchmark-ci | |
working-directory: ./src/github.com/kevinburke/rickover |