github.com/yandex/pandora@v0.5.32/.github/workflows/test.yml (about)

     1  name: Test
     2  
     3  on:
     4    push:
     5      branches:
     6        - master
     7        - dev
     8    pull_request:
     9      branches:
    10        - master
    11        - dev
    12  
    13  jobs:
    14    run-unit-tests:
    15      name: Unit Tests
    16      concurrency:
    17        group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
    18        cancel-in-progress: true
    19      strategy:
    20        fail-fast: false
    21        matrix:
    22          os: [ubuntu, macOS]
    23      env:
    24        OS: ${{ matrix.os }}-latest
    25        GO: ${{ matrix.go-version }}
    26      runs-on: ${{ matrix.os }}-latest
    27      steps:
    28        - name: Checkout code
    29          uses: actions/checkout@v3
    30  
    31        - name: Install Go
    32          uses: actions/setup-go@v3
    33          with:
    34            go-version: 1.21.x
    35            cache: true
    36  
    37        - name: Test
    38          run: go test -race -coverprofile unit.txt -covermode atomic ./...
    39  
    40        - name: Upload coverage report to Codecov
    41          uses: codecov/codecov-action@v3
    42          with:
    43            file: ./unit.txt
    44            flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
    45            name: unit