github.com/gramework/gramework@v1.8.1-0.20231027140105-82555c9057f5/.github/workflows/main.yml (about)

     1  name: Test
     2  
     3  on:
     4    push:
     5      branches:
     6        - dev
     7    pull_request:
     8  
     9  jobs:
    10    test:
    11      strategy:
    12        matrix:
    13          go-version: [1.18.x, 1.19.x]
    14          os: [ubuntu-latest, macos-latest, windows-latest]
    15      runs-on: ${{ matrix.os }}
    16  
    17      steps:
    18        - uses: actions/checkout@v2
    19        - uses: actions/setup-go@v3
    20          with:
    21            go-version: ${{ matrix.go-version }}
    22  
    23        - name: Get Go cache paths
    24          id: go-env
    25          run: |
    26            echo "::set-output name=cache::$(go env GOCACHE)"
    27            echo "::set-output name=modcache::$(go env GOMODCACHE)"
    28  
    29        - name: Set up Go cache
    30          uses: actions/cache@v3
    31          with:
    32            key: golangci-lint-${{ runner.os }}-go-${{ hashFiles('go.mod') }}
    33            restore-keys: golangci-lint-${{ runner.os }}-go-
    34            path: |
    35              ${{ steps.go-env.outputs.cache }}
    36              ${{ steps.go-env.outputs.modcache }}
    37  
    38        - run: go version
    39  
    40        - run: go test ./...
    41  
    42        - run: go test -race ./...