Skip to content

Replace travis with github-actions #1

Replace travis with github-actions

Replace travis with github-actions #1

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
cache-dependency-path: go.sum
go-version-file: go.mod
- name: Install dependencies
run: go get .
- name: Go Format
run: gofmt -s -w . && git diff --exit-code
- name: Go Vet
run: go vet ./...
- name: Go Test
env:
STORAGE_REDIS_HOST: redis
run: go test -v -race --tags redis -coverprofile=coverage.txt -covermode=atomic ./...
- name: Build
run: go build ./...