-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.pester.yml
More file actions
58 lines (55 loc) · 1.82 KB
/
docker-compose.pester.yml
File metadata and controls
58 lines (55 loc) · 1.82 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
# docker-compose.pester.yml
# Linux-local Pester test orchestration
# Usage:
# docker compose -f docker-compose.pester.yml run --rm pester-fast
# docker compose -f docker-compose.pester.yml run --rm pester-full
services:
pester-fast:
build:
context: .
dockerfile: Dockerfile.pester
volumes:
- .:/workspace
- pester-results:/workspace-output
tmpfs:
- /tmp
working_dir: /workspace
environment:
- PWSH_TEST_MODE=fast
- CI=false
command: >
pwsh -NoProfile -Command "
$$outDir = '/workspace-output';
if (-not (Test-Path $$outDir)) { New-Item -ItemType Directory -Path $$outDir -Force | Out-Null };
$$config = ./PesterConfiguration.ps1;
$$config.TestResult.OutputPath = Join-Path $$outDir 'testResults-linux.xml';
$$config.Run.Exit = $$true;
Invoke-Pester -Configuration $$config
"
pester-full:
build:
context: .
dockerfile: Dockerfile.pester
volumes:
- .:/workspace
- pester-results:/workspace-output
tmpfs:
- /tmp
working_dir: /workspace
environment:
- PWSH_TEST_MODE=full
# Linux 容器当前命中 Pester coverage 收尾异常,先保留 full 断言回归,
# 将 coverage 责任收敛到 host full,避免聚合命令因为已知兼容性问题假红。
- PWSH_TEST_ENABLE_COVERAGE=false
- CI=false
command: >
pwsh -NoProfile -Command "
$$outDir = '/workspace-output';
if (-not (Test-Path $$outDir)) { New-Item -ItemType Directory -Path $$outDir -Force | Out-Null };
$$config = ./PesterConfiguration.ps1;
$$config.TestResult.OutputPath = Join-Path $$outDir 'testResults-linux.xml';
$$config.Run.Exit = $$true;
Invoke-Pester -Configuration $$config
"
volumes:
pester-results: