Skip to content

Commit

Permalink
use matrix for all build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Sep 18, 2019
1 parent 457e281 commit 65e538a
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
strategy:
matrix:
go-version: [1.13]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: ${{ matrix.go-version }}
- name: Install linter
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.18.0
- name: Run linter
Expand All @@ -26,6 +29,8 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go mod download
- name: Run unit tests
run: go test -v -p 1 -tags=unit -covermode=atomic -timeout=60s ./...

Expand All @@ -47,8 +52,16 @@ jobs:
env:
MYSQL_DATABASE: testdb
MYSQL_ROOT_PASSWORD: password
strategy:
matrix:
go-version: [1.13]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go mod download
- name: Run integration tests
run: go test -p 1 -tags=integration -covermode=atomic -timeout=60s ./...
env:
Expand All @@ -72,11 +85,16 @@ jobs:
env:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: password
strategy:
matrix:
go-version: [1.13]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go mod download
- name: Benchmark
run: go test -run=Benchmark -benchmem -bench=.

0 comments on commit 65e538a

Please sign in to comment.