cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2026.3.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.ci/scripts/windows/component-test.ps1

40lines · modecode

1Set-StrictMode -Version Latest
2$ErrorActionPreference = "Stop"
3$ProgressPreference = "SilentlyContinue"
4
5$env:TARGET_OS = "windows"
6$env:LOCAL_OS = "windows"
7$env:TARGET_ARCH = "amd64"
8$env:LOCAL_ARCH = "amd64"
9$env:CGO_ENABLED = 1
10
11python --version
12python -m pip --version
13
14
15Write-Host "Building cloudflared"
16& make cloudflared
17if ($LASTEXITCODE -ne 0) { throw "Failed to build cloudflared" }
18
19
20Write-Host "Running unit tests"
21# Not testing with race detector because of https://github.com/golang/go/issues/61058
22# We already test it on other platforms
23go test -failfast -v -mod=vendor ./...
24if ($LASTEXITCODE -ne 0) { throw "Failed unit tests" }
25
26
27# On Gitlab runners we need to add all of this addresses to the NO_PROXY list in order for the tests to run.
28$env:NO_PROXY = "pypi.org,files.pythonhosted.org,api.cloudflare.com,argotunneltest.com,argotunnel.com,trycloudflare.com,${env:NO_PROXY}"
29Write-Host "No Proxy: ${env:NO_PROXY}"
30Write-Host "Running component tests"
31try {
32 python -m pip --disable-pip-version-check install --upgrade -r component-tests/requirements.txt --use-pep517
33 python component-tests/setup.py --type create
34 python -m pytest component-tests -o log_cli=true --log-cli-level=INFO --junit-xml=report.xml
35 if ($LASTEXITCODE -ne 0) {
36 throw "Failed component tests"
37 }
38} finally {
39 python component-tests/setup.py --type cleanup
40}
41