github.com/cilium/statedb@v0.3.2/.github/workflows/pr.yml (about)

     1  name: pr
     2  on:
     3    pull_request:
     4      branches:
     5      - main
     6  
     7  env:
     8    GO_VERSION: 1.23
     9  
    10  jobs:
    11    test:
    12      runs-on: ubuntu-latest
    13      steps:
    14        - uses: actions/setup-go@v2
    15          with:
    16            go-version: ${{ env.GO_VERSION }}
    17        - uses: actions/checkout@v3
    18          with:
    19            fetch-depth: 0
    20        - name: test
    21          run: |
    22            echo '```' > results.comment
    23            echo "$ make test" >> results.comment
    24            make test 2>&1 | tee test.out
    25            cat test.out | tail -20 >> results.comment
    26            echo "-----" >> results.comment
    27  
    28        - name: test-race
    29          run: |
    30            make test-race
    31        - name: bench
    32          run: |
    33            echo "$ make bench" >> results.comment
    34            make bench 2>&1 | tee bench.out
    35            cat bench.out >> results.comment
    36            echo '```' >> results.comment
    37            
    38        - name: results
    39          if: always()
    40          uses: thollander/actions-comment-pull-request@v2
    41          with:
    42            comment_tag: results
    43            filePath: results.comment
    44