github.com/fufuok/balancer@v1.0.0/.github/workflows/go.yml (about)

     1  name: Go
     2  
     3  on:
     4    push:
     5      branches: [ master ]
     6    pull_request:
     7      branches: [ master ]
     8  
     9  jobs:
    10    test:
    11      name: Test
    12      strategy:
    13        fail-fast: false
    14        matrix:
    15          go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x]
    16          os: [ubuntu-latest, windows-latest]
    17      runs-on: ${{ matrix.os}}
    18      steps:
    19        - name: Install Go
    20          uses: actions/setup-go@v2
    21          with:
    22            go-version: ${{ matrix.go-version }}
    23        - name: Fetch Repository
    24          uses: actions/checkout@v2
    25        - name: Make Ready
    26          run: |
    27            go version
    28            go env
    29            go get -t -v ./...
    30            git rev-parse --short HEAD
    31        - name: Run Test
    32          run: go test -v -cover -covermode=atomic ./...
    33    bench:
    34      name: Benchmark
    35      runs-on: ubuntu-latest
    36      steps:
    37        - name: Install Go
    38          uses: actions/setup-go@v2
    39          with:
    40            go-version: ^1.16
    41        - name: Fetch Repository
    42          uses: actions/checkout@v2
    43        - name: Run Benchmark
    44          run: go test -run=^$ -benchmem -benchtime=1s -bench=.