github.com/bytedance/mockey@v1.2.10/.github/workflows/tests.yml (about) 1 name: Tests 2 3 on: [pull_request] 4 5 jobs: 6 unit-benchmark-test: 7 strategy: 8 matrix: 9 go: [ 10 "1.13", 11 # "1.14", 12 # "1.15", 13 # "1.16", 14 # "1.17", 15 "1.18", 16 "1.19", 17 "1.20", 18 "1.21", 19 ] 20 os: [linux] # should be [ macOS, linux, windows ], but currently we don't have macOS and windows runners 21 arch: [X64, ARM64] 22 exclude: 23 - os: Linux 24 arch: ARM64 25 - os: Windows 26 arch: ARM64 27 runs-on: ["${{ matrix.os }}", "${{ matrix.arch }}"] 28 steps: 29 - uses: actions/checkout@v3 30 - name: Set up Go 31 uses: actions/setup-go@v3 32 with: 33 go-version: ${{ matrix.go }} 34 - name: Unit Test 35 run: MOCKEY_DEBUG=true go test -gcflags="all=-l -N" -race -covermode=atomic -coverprofile=coverage.out ./... 36 - name: Benchmark 37 run: go test -gcflags="all=-l -N" -bench=. -benchmem -run=none ./... 38 39 unit-benchmark-test-no-race: # some go version -race has fatal issues 40 strategy: 41 matrix: 42 go: ["1.14", "1.15", "1.16", "1.17"] 43 os: [linux] # should be [ macOS, linux, windows ], but currently we don't have macOS and windows runners 44 arch: [X64, ARM64] 45 exclude: 46 - os: Linux 47 arch: ARM64 48 - os: Windows 49 arch: ARM64 50 runs-on: ["${{ matrix.os }}", "${{ matrix.arch }}"] 51 steps: 52 - uses: actions/checkout@v3 53 - name: Set up Go 54 uses: actions/setup-go@v3 55 with: 56 go-version: ${{ matrix.go }} 57 - name: Unit Test 58 run: MOCKEY_DEBUG=true go test -gcflags="all=-l -N" -covermode=atomic -coverprofile=coverage.out ./... 59 - name: Benchmark 60 run: go test -gcflags="all=-l -N" -bench=. -benchmem -run=none ./...