Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalvinalvin committed Jan 3, 2024
1 parent 0c4dd4a commit d845df5
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
name: Build and Test
on: [push, pull_request]
name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18, 1.19]
go: ["1.20", "1.21"]
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v3
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2"
- name: Build
run: go build ./...
- name: Test
run: sh ./goclean.sh
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Build
run: go build -v ./...

- name: Install Linters
run: go install github.com/golangci/golangci-lint/cmd/[email protected]

- name: Test
run: sh ./goclean.sh

0 comments on commit d845df5

Please sign in to comment.