-
-
Notifications
You must be signed in to change notification settings - Fork 26
87 lines (82 loc) · 2.54 KB
/
test_checks.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
name: 🧪 Run Tests
on:
workflow_call:
jobs:
run-unit-tests-2d:
name: Run Unit Tests 2D
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Unit Tests for 2D Build
shell: sh
run: |
cargo test --all-targets --features="build2d,test" --no-default-features
run-unit-tests-3d:
name: Run Unit Tests 3D
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Unit Tests for 3D Build
shell: sh
run: |
cargo test --all-targets --features="build3d,test" --no-default-features
run-integration-tests-2d:
name: Run Integration Tests 2D
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
# include-templates: true
- name: Run Integration Tests for 2D Build
if: false
shell: sh
run: |
./scripts/build-dev-2d.sh
ls bin2d/addons/godot-rapier2d/bin
godot --headless --path ./bin2d test.tscn --quit-after 1000 > output.log 2>&1
echo "---------------------"
grep "ERROR:" output.log
echo "---------------------"
if grep -q "ERROR:" output.log; then
echo "Error found in output"
exit 1
elif grep -q "Success" output.log; then
echo "Test completed successfully"
else
echo "No success message found"
exit 1
fi
run-integration-tests-3d:
name: Run Integration Tests 3D
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
#- uses: chickensoft-games/setup-godot@v1
# name: 🤖 Setup Godot
# with:
# version: 4.3.0
# use-dotnet: false
# include-templates: true
- name: Run Integration Tests for 3D Build
if: false
shell: sh
run: |
./scripts/build-dev-3d.sh
ls bin3d/addons/godot-rapier3d/bin
godot --headless --path ./bin3d test.tscn --quit-after 1000 > output.log 2>&1
echo "---------------------"
grep "ERROR:" output.log
echo "---------------------"
if grep -q "ERROR:" output.log; then
echo "Error found in output"
exit 1
elif grep -q "Success" output.log; then
echo "Test completed successfully"
else
echo "No success message found"
exit 1
fi