github.com/minio/madmin-go/v2@v2.2.1/.github/workflows/go.yml (about)

     1  name: Go
     2  
     3  on:
     4    pull_request:
     5      branches:
     6      - main
     7      - master
     8  
     9    push:
    10      branches:
    11      - main
    12      - master
    13  
    14  jobs:
    15    build:
    16      name: Lint checks Go ${{ matrix.go-version }}
    17      runs-on: ubuntu-latest
    18      strategy:
    19        matrix:
    20          go-version: [1.19.x, 1.20.x]
    21      steps:
    22      - name: Set up Go ${{ matrix.go-version }}
    23        uses: actions/setup-go@v1
    24        with:
    25          go-version: ${{ matrix.go-version }}
    26        id: go
    27  
    28      - name: Check out code into the Go module directory
    29        uses: actions/checkout@v1
    30  
    31      - name: Build
    32        run: |
    33           curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
    34           $(go env GOPATH)/bin/golangci-lint run --config ./.golangci.yml
    35           go vet ./...
    36    test:
    37      name: Testing Go ${{ matrix.go-version }} on ${{ matrix.os }}
    38      runs-on: ${{ matrix.os }}
    39      strategy:
    40        matrix:
    41          go-version: [1.19.x, 1.20.x]
    42          os: [ubuntu-latest, windows-latest, macos-latest]
    43      steps:
    44      - name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
    45        uses: actions/setup-go@v1
    46        with:
    47          go-version: ${{ matrix.go-version }}
    48        id: go
    49  
    50      - name: Check out code into the Go module directory
    51        uses: actions/checkout@v1
    52  
    53      - name: Test on ${{ matrix.os }}
    54        if: matrix.os == 'ubuntu-latest'
    55        run: |
    56           go test -v -race ./...
    57           GOARCH=386 GOOS=linux go test -v ./...
    58  
    59      - name: Test on ${{ matrix.os }}
    60        if: matrix.os != 'ubuntu-latest'
    61        run: |
    62           go test -v -race ./...
    63