forked from kubernetes/minikube
-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (78 loc) · 2.23 KB
/
Copy pathunit-test.yml
File metadata and controls
78 lines (78 loc) · 2.23 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Unit Test
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- .github/workflows/unit-test.yml
- .gitattributes
- go.mod
- Makefile
- '**/*.go'
- '**/testdata/**/*.yaml'
- '**/testdata/**/*.yml'
- '**/testdata/**/*.json'
- '!hack/**'
- '!site/**'
- '!**/*.md'
- '!**/*.json'
pull_request:
paths:
- .github/workflows/unit-test.yml
- .gitattributes
- go.mod
- Makefile
- '**/*.go'
- '**/testdata/**/*.yaml'
- '**/testdata/**/*.yml'
- '**/testdata/**/*.json'
- '!hack/**'
- '!site/**'
- '!**/*.md'
- '!**/*.json'
# Limit one unit test job running per PR/Branch
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# For example, if you push multiple commits to a pull request in quick succession, only the latest workflow run will continue
cancel-in-progress: true
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.26.5'
permissions:
contents: read
jobs:
unit_test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-15, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
timeout-minutes: 1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
timeout-minutes: 7
with:
go-version: ${{env.GO_VERSION}}
cache: true
- name: Download Dependencies
timeout-minutes: 3
run: go mod download
# needed because pkg/drivers/kvm/domain.go:28:2:
- name: Install libvirt (Linux)
timeout-minutes: 2
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libvirt-dev
- name: Install make (Windows)
timeout-minutes: 1
if: runner.os == 'Windows'
run: choco install make -y
# TODO: add gopogh reports for unit tests too
- name: unit test
timeout-minutes: 12
env:
TESTSUITE: unittest
run: make test
continue-on-error: false