diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8247b77..66a3814 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,6 +1,3 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - name: Go on: @@ -9,20 +6,24 @@ on: pull_request: branches: [ "master" ] +permissions: + contents: read + pull-requests: read + jobs: - build: - runs-on: ubuntu-latest + strategy: + matrix: + go: ['1.21', '1.22'] + os: [macos-latest, windows-latest, ubuntu-latest] + name: lint + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... -race + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + - name: Build + run: go build -v ./... + - name: Test + run: go test -v ./... -race diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index ab5f0a8..a3cb27b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -12,15 +12,17 @@ permissions: jobs: golangci: + strategy: + matrix: + go: ['1.21', '1.22'] + os: [macos-latest, windows-latest, ubuntu-latest] name: lint - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 with: - go-version: '1.21' - + go-version: ${{ matrix.go }} - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: