...

Text file src/github.com/golang/mock/.github/workflows/test.yaml

Documentation: github.com/golang/mock/.github/workflows

     1name: Run tests
     2on:
     3  push:
     4    branches: [main]
     5  pull_request:
     6    branches: [main]
     7env:
     8  GO111MODULE: on
     9jobs:
    10  test:
    11    strategy:
    12      matrix:
    13        go-version: [1.15.x, 1.18.x]
    14        os: [ubuntu-latest]
    15    runs-on: ${{ matrix.os }}
    16    steps:
    17
    18    - name: Install Go
    19      uses: actions/setup-go@v2
    20      with:
    21        go-version: ${{ matrix.go-version }}
    22
    23    - name: Checkout code
    24      uses: actions/checkout@v2
    25
    26    - name: Vet and build
    27      run: |
    28        go vet ./...
    29        go build ./...
    30
    31    - name: Install mockgen
    32      run: |
    33        go install github.com/golang/mock/mockgen
    34
    35    - name: Run test script
    36      run: |
    37        ./ci/test.sh
    38        ./ci/check_panic_handling.sh
    39
    40    - name: Run Go tests all
    41      if: ${{ startsWith(matrix.go-version, '1.18') }}
    42      run: |
    43        for i in $(find $PWD -name go.mod); do
    44          pushd $(dirname $i)
    45          go test ./...
    46          popd
    47        done 
    48
    49    - name: Run Go tests some
    50      if: ${{ startsWith(matrix.go-version, '1.18') == false }}
    51      run: |
    52          go test ./...

View as plain text