File: test.yaml

package info (click to toggle)
golang-github-golang-mock 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, forky, sid, trixie
  • size: 800 kB
  • sloc: sh: 58; makefile: 3
file content (55 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Run tests
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
env:
  GO111MODULE: on
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.11.x, 1.16.x]
        os: [ubuntu-latest]
    runs-on: ${{ matrix.os }}
    steps:

    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: ${{ matrix.go-version }}

    - name: Checkout code
      uses: actions/checkout@v2

    # Needed for versions <1.14 tests
    - name: Install mock
      run: |
        GO111MODULE=off go get github.com/golang/mock | true

    - name: Vet and build
      run: |
        go vet ./...
        go build ./...

    - name: Install tools
      run: |
        go install github.com/golang/mock/mockgen
        GO111MODULE=off go get -u golang.org/x/lint/golint

    - name: Run test scripts
      run: |
        ./ci/check_go_fmt.sh
        ./ci/check_go_lint.sh
        ./ci/check_go_generate.sh
        ./ci/check_go_mod.sh
        ./ci/check_panic_handling.sh

    - name: Run Go tests
      run: |
        for i in $(find $PWD -name go.mod); do
          pushd $(dirname $i)
          go test ./...
          popd
        done