github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/.github/workflows/tests-go.yml (about)

     1  name: Go Tests
     2  
     3  on:
     4    push:
     5      branches: [main]
     6    pull_request:
     7      branches: [main]
     8  
     9  jobs:
    10    go-tests:
    11      runs-on: ubuntu-latest
    12      strategy:
    13        fail-fast: false
    14      steps:
    15        - name: Checkout
    16          uses: actions/checkout@v2
    17        - uses: actions/setup-go@v2
    18          with:
    19            go-version: '^1.19.0'
    20        - name: Cache go mod directories
    21          uses: actions/cache@v2
    22          with:
    23            path: ~/go/pkg/mod
    24            key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    25            restore-keys: |
    26              ${{ runner.os }}-go-
    27        - name: install dev-tools
    28          run: make install-dev-tools
    29        - name: Ensure logrus is not used by pkg/agent/profiler
    30          run: make ensure-logrus-not-used
    31        - name: Run Go tests
    32          run: make coverage
    33        - name: Upload codecov coverage
    34          uses: codecov/codecov-action@v1
    35          with:
    36            fail_ci_if_error: false
    37            verbose: true