2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-04-22 16:50:18 +08:00

Update go build workflow to run with different go versions

This commit is contained in:
Ken Hibino 2021-01-29 16:08:20 -08:00
parent 590a04dfe8
commit 389db8f1da

View File

@ -1,15 +1,14 @@
name: Go name: Go
on: on: [push, pull_request]
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.14.x, 1.15.x]
runs-on: ${{ matrix.os }}
services: services:
redis: redis:
image: redis image: redis
@ -21,13 +20,31 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: ${{ matrix.go-version }}
- name: Build - name: Build
run: go build -v ./... run: go build -v ./...
- name: Test - name: Test
run: go test -race -v ./... run: go test -race -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Bench Test - name: Upload Test Results
run: go test -run=^$ -bench=. -loglevel=debug ./... uses: actions/upload-artifact@v2
with:
name: test-results
path: test-results.txt
- name: Upload Coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.txt
- name: Benchmark Test
run: go test -run=^$ -bench=. ./... | tee -a bench.txt
- name: Upload Benchmark
uses: actions/upload-artifact@v2
with:
name: bench-${{ matrix.os }}-${{ matrix.go-version }}
path: bench.txt