github.com/fengjian1993/viper@v1.11.0/.github/workflows/ci.yml (about)

     1  name: CI
     2  
     3  on:
     4    push:
     5      branches:
     6        - master
     7    pull_request:
     8  
     9  jobs:
    10    test:
    11      name: Test
    12      runs-on: ${{ matrix.os }}
    13      strategy:
    14        # Fail fast is disabled because there are Go version specific features and tests
    15        # that should be able to fail independently.
    16        fail-fast: false
    17        matrix:
    18          os: [ubuntu-latest, macos-latest, windows-latest]
    19          go: ['1.14', '1.15', '1.16', '1.17']
    20      env:
    21        GOFLAGS: -mod=readonly
    22  
    23      steps:
    24        - name: Set up Go
    25          uses: actions/setup-go@v2
    26          with:
    27            go-version: ${{ matrix.go }}
    28  
    29        - name: Checkout code
    30          uses: actions/checkout@v2
    31  
    32        - name: Test
    33          run: go test -race -v ./...
    34  
    35    lint:
    36      name: Lint
    37      runs-on: ubuntu-latest
    38      env:
    39        GOFLAGS: -mod=readonly
    40  
    41      steps:
    42        - name: Set up Go
    43          uses: actions/setup-go@v2
    44          with:
    45            go-version: 1.17
    46  
    47        - name: Checkout code
    48          uses: actions/checkout@v2
    49  
    50        - name: Lint
    51          uses: golangci/golangci-lint-action@v2
    52          with:
    53            version: v1.43.0