github.com/vmware/govmomi@v0.51.0/.github/workflows/govmomi-go-tests.yaml (about) 1 name: Unit Tests 2 3 permissions: 4 contents: read 5 actions: read 6 7 on: 8 push: 9 branches: main 10 pull_request: 11 branches: main 12 13 jobs: 14 go-tests: 15 name: Run Unit Tests 16 strategy: 17 matrix: 18 go-version: ["1.23", "1.24"] 19 platform: [ubuntu-latest] 20 fail-fast: false 21 22 runs-on: ${{ matrix.platform }} 23 timeout-minutes: 10 24 25 steps: 26 - name: Check Repository 27 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 28 29 - name: Setup Go ${{ matrix.go-version }} 30 uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 31 with: 32 go-version: ${{ matrix.go-version }} 33 id: go 34 35 - name: Restore Go Cache 36 uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 37 with: 38 path: | 39 ~/.cache/go-build 40 ~/go/pkg/mod 41 key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} 42 restore-keys: | 43 ${{ runner.os }}-go-${{ matrix.go-version }}- 44 45 - name: Run Tests 46 env: 47 TEST_COUNT: 1 48 TEST_RACE_HISTORY_SIZE: 5 49 TEST_TIMEOUT: 5m 50 TEST_OPTS: "" 51 run: make go-test 52 53 - name: Debug on Failure 54 if: ${{ failure() }} 55 uses: mxschmitt/action-tmate@7b6a61a73bbb9793cb80ad69b8dd8ac19261834c # v3.22