-
Notifications
You must be signed in to change notification settings - Fork 579
34 lines (32 loc) · 1.19 KB
/
test_windows.yml
File metadata and controls
34 lines (32 loc) · 1.19 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
name: Test (Windows)
on:
push:
# TODO: Also run the tests when a Windows-specific features is changed.
# For example, the Windows Exporter for Prometheus and Event Log tailers.
branches:
- main
# TODO: Run the Windows tests for each PR?
# For now we don't do it just because it takes time.
pull_request:
types: [labeled, opened, synchronize, reopened]
permissions:
contents: read
jobs:
test_windows:
if: ${{ contains(github.event.pull_request.labels.*.name, 'os:windows') || github.event_name == 'push' || github.event_name == 'merge_group' }}
name: Test (Windows)
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
# TODO: Enable caching later.
# We'll need to make sure the same cache is reused by the workflow to build Windows binaries.
cache: false
- name: Test
run: '& "C:/Program Files/git/bin/bash.exe" -c ''make GO_TAGS="nodocker nonetwork" test'''