diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d8ad98eb..c200d0fb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,19 +1,28 @@ -name: Go -on: [push] +name: go test ./... +on: + push: + branches: + - master + pull_request: + jobs: test: - name: Test - runs-on: ubuntu-latest + strategy: + matrix: + go: [stable] + os: [ubuntu-latest, macos-latest, windows-latest] + + name: test + runs-on: ${{ matrix.os }} steps: - name: Set up Go 1.23 - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: 1.23 - id: go + go-version: ${{ matrix.go }} - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 00000000..54cb716b --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,34 @@ +name: golangci-lint +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + checks: write + +jobs: + golangci: + strategy: + matrix: + go: [stable] + os: [ubuntu-latest, macos-latest, windows-latest] + + name: lint + runs-on: ${{ matrix.os }} + steps: + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.60