github.com/vicanso/lru-ttl@v1.5.1/.github/workflows/test.yml (about)

     1  name: Test
     2  
     3  on:
     4    push:
     5      branches: [ master ]
     6    pull_request:
     7      branches: [ master ]
     8  
     9  jobs:
    10  
    11    build:
    12      name: Build
    13      runs-on: ubuntu-latest
    14      strategy:
    15        matrix:
    16          go:
    17          - '1.18'
    18          - '1.17'
    19          - '1.16'
    20          - '1.15'
    21          - '1.14'
    22          - '1.13'
    23      steps:
    24  
    25      - name: Go ${{ matrix.go }} test 
    26        uses: actions/setup-go@v2
    27        with:
    28          go-version: ${{ matrix.go }}
    29  
    30      - name: Check out code into the Go module directory
    31        uses: actions/checkout@v2
    32  
    33      - name: Get dependencies
    34        run: |
    35          go get -v -t -d ./...
    36          if [ -f Gopkg.toml ]; then
    37              curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
    38              dep ensure
    39          fi
    40          curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
    41  
    42      - name: Lint
    43        run: make lint
    44  
    45      - name: Test
    46        run: make test