...

Text file src/github.com/google/go-querystring/.github/workflows/tests.yml

Documentation: github.com/google/go-querystring/.github/workflows

     1on:
     2  push:
     3    branches:
     4      - master
     5  pull_request:
     6    branches:
     7      - master
     8
     9name: tests
    10
    11jobs:
    12  test:
    13    strategy:
    14      matrix:
    15        go-version: [1.x, 1.15.x]
    16        platform: [ubuntu-latest]
    17        include:
    18          # only update test coverage stats with most recent go version on linux
    19          - go-version: 1.x
    20            platform: ubuntu-latest
    21            update-coverage: true
    22    runs-on: ${{ matrix.platform }}
    23
    24    steps:
    25    - name: Cancel previous workflow runs
    26      uses: styfle/cancel-workflow-action@0.8.0
    27      with:
    28        access_token: ${{ github.token }}
    29
    30    - uses: actions/checkout@v2
    31    - uses: actions/setup-go@v2
    32      with:
    33        go-version: ${{ matrix.go-version }}
    34    - run: go version
    35
    36    - name: Cache go modules
    37      uses: actions/cache@v2
    38      with:
    39        path: ~/go/pkg/mod
    40        key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    41        restore-keys: ${{ runner.os }}-go-
    42
    43    - name: Run go test
    44      run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
    45
    46    - name: Upload coverage to Codecov
    47      if: ${{ matrix.update-coverage }}
    48      uses: codecov/codecov-action@v1

View as plain text