Created
January 27, 2020 07:05
-
-
Save edwintye/f0f5b665d5710fa83c20386c37a60d04 to your computer and use it in GitHub Desktop.
Example golang actions
This file contains hidden or 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: 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