-
Notifications
You must be signed in to change notification settings - Fork 193
71 lines (57 loc) · 2.21 KB
/
unit-tests.yaml
File metadata and controls
71 lines (57 loc) · 2.21 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
name: Unit Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
unit-tests:
runs-on: ubuntu-latest
name: Run Unit Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore Oryx.sln
- name: Build solution
run: dotnet build Oryx.sln --no-restore --configuration Release
- name: Run BuildScriptGenerator.Tests
run: dotnet test tests/BuildScriptGenerator.Tests/BuildScriptGenerator.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Run BuildScriptGenerator.Common.Tests
run: dotnet test tests/BuildScriptGenerator.Common.Tests/BuildScriptGenerator.Common.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Run Detector.Tests
run: dotnet test tests/Detector.Tests/Detector.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Run BuildScriptGeneratorCli.Tests
run: dotnet test tests/BuildScriptGeneratorCli.Tests/BuildScriptGeneratorCli.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Run Common.Tests
run: dotnet test tests/Oryx.Common.Tests/Common.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Run BuildServer.Tests
run: dotnet test tests/BuildServer.Tests/BuildServer.Tests.csproj --no-build --configuration Release --verbosity normal
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Run Startup Script Generator Tests
env:
GOTOOLCHAIN: local
run: |
cd src/startupscriptgenerator/src
GOROOT_DIR=$(go env GOROOT)
cp -r "$(pwd)/common" "$GOROOT_DIR/src/common"
for dir in */; do
if [ "$dir" = "common/" ]; then
continue
fi
if [ -f "$dir/go.mod" ]; then
echo "Testing $dir..."
cd "$dir"
go test -v ./...
cd ..
fi
done