Skip to content

Commit

Permalink
use mage and support multi os and go version
Browse files Browse the repository at this point in the history
  • Loading branch information
dhia-gharsallaoui committed Sep 22, 2022
1 parent d286e7b commit 05d8bb8
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,43 @@ on:
jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.17, 1.18, 1.19]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
- name: Build
run: go build -v ./...

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build
run: go build -v ./...
- uses: actions/checkout@v3

- name: Install mage
run: |
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go install
cd ./..
- name: Test
run: go test -v ./...
run: mage test

- name: Vet
run: mage vet

golangci:
name: lint
Expand All @@ -31,7 +54,9 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.17

- uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down

0 comments on commit 05d8bb8

Please sign in to comment.