-
Notifications
You must be signed in to change notification settings - Fork 2k
99 lines (98 loc) · 2.7 KB
/
test-windows.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: test-windows
on:
pull_request:
branches:
- main
- release/**
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
push:
branches:
- main
- release/**
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.changelog/**'
- '.tours/**'
- 'contributing/**'
- 'demo/**'
- 'dev/**'
- 'e2e/**'
- 'integrations/**'
- 'pkg/**'
- 'scripts/**'
- 'terraform/**'
- 'ui/**'
- 'website/**'
env:
VAULT_VERSION: 1.4.1
jobs:
test-windows:
runs-on: 'windows-2019-16core'
env:
GOTESTSUM_PATH: c:\tmp\test-reports
steps:
- name: Docker Info
run: docker version
- run: git config --global core.autocrlf false
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: ".go-version"
- name: Show installed Go version
shell: bash
run: |-
export PATH=/c/go/bin:/c/gopath/bin:$PATH
go version
- uses: "./.github/actions/install-vault"
with:
version: "$VAULT_VERSION"
- run: vault version
- run: choco install make
- name: Install golang dependencies
shell: bash
run: |-
make deps
- name: Pre-download docker test image
shell: bash
run: |-
docker pull docker.mirror.hashicorp.services/hashicorpdev/busybox-windows:ltsc2019
- name: Build nomad
shell: bash
run: |-
go install .
- name: Run tests with gotestsum
shell: bash
env:
BUSYBOX_IMAGE: docker.mirror.hashicorp.services/hashicorpdev/busybox-windows:ltsc2019
run: |-
# Only test docker driver tests for now
export PATH=/c/go/bin:/c/gopath/bin:$PATH
gotestsum --format=short-verbose \
--junitfile results.xml \
github.com/hashicorp/nomad/drivers/docker \
github.com/hashicorp/nomad/client/lib/fifo \
github.com/hashicorp/nomad/client/logmon \
github.com/hashicorp/nomad/client/allocrunner/taskrunner/template \
github.com/hashicorp/nomad/plugins/base
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: results.xml
path: results.xml
permissions:
contents: read