Skip to content

Instantly share code, notes, and snippets.

@edwintye
Created January 27, 2020 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwintye/f0f5b665d5710fa83c20386c37a60d04 to your computer and use it in GitHub Desktop.
Save edwintye/f0f5b665d5710fa83c20386c37a60d04 to your computer and use it in GitHub Desktop.
Example golang actions
name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
redis: [rc, latest, 5.0]
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go mod download
- name: Unit Test
run: go test -tags unit -v .
- name: Integration Test
env:
REDIS_VERSION: ${{ matrix.redis }}
run: go test -tags integration -v .
- name: Coverage
run: go test -tags=unit,integration -v -covermode=count .
- name: Build
run: go build -v .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment