mirror of
https://gitee.com/rancher/rancher.git
synced 2025-12-06 07:49:17 +08:00
26 lines
700 B
YAML
26 lines
700 B
YAML
name: Unit Tests
|
|
on: [workflow_dispatch, workflow_call]
|
|
jobs:
|
|
unit-test:
|
|
runs-on:
|
|
- runs-on
|
|
- spot=false
|
|
- runner=8cpu-linux-arm64
|
|
- run-id=${{ github.run_id }}
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
# https://github.com/golang/go/issues/75031
|
|
- name: Set toolchain version
|
|
run: go env -w GOTOOLCHAIN=go1.25.4+auto
|
|
|
|
- name: Run unit tests
|
|
run: go test -cover -tags=test ./pkg/...
|
|
|