...

Text file src/github.com/stretchr/objx/.github/workflows/go.yml

Documentation: github.com/stretchr/objx/.github/workflows

     1name: Go
     2
     3on:
     4  push:
     5    branches: [ master ]
     6  pull_request:
     7    branches: [ master ]
     8
     9jobs:
    10
    11  build:
    12    env:
    13      CC_TEST_REPORTER_ID: 68feaa3410049ce73e145287acbcdacc525087a30627f96f04e579e75bd71c00
    14    runs-on: ubuntu-latest
    15    strategy:
    16      matrix:
    17        go: [ '1.22', '1.21', '1.20' ]
    18    steps:
    19    - uses: actions/checkout@v4
    20
    21    - name: Pre-run
    22      run: |
    23        curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
    24        chmod +x ./cc-test-reporter
    25        ./cc-test-reporter before-build
    26        curl -sL https://taskfile.dev/install.sh | sh
    27
    28    - name: Set up Go
    29      uses: actions/setup-go@v5
    30      with:
    31        go-version: ${{ matrix.go }}
    32
    33    - name: Setup go module cache
    34      uses: actions/cache@v4
    35      with:
    36        path: |
    37          ~/.cache/go-build
    38          ~/go/pkg/mod
    39        key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    40        restore-keys: |
    41          ${{ runner.os }}-go-
    42
    43    - name: Lint
    44      run: diff -u <(echo -n) <(./bin/task lint)
    45
    46    - name: Test
    47      run: ./bin/task test-coverage
    48
    49    - name: Post run
    50      run: ./cc-test-reporter after-build format-coverage -t gocov --prefix github.com/stretchr/objx .cover/c.out --exit-code $?
    51

View as plain text