Skip to content

Commit 95de1ad

Browse files
committed
Add bundled minimal test map fixture for smoke tests
Since all external map downloads are blocked (403 Forbidden), bundle a minimal 2x2 Spring map as a test fixture. The map includes: - mapinfo.lua with proper metadata - maps/TestMinimal2x2.smf with minimal SMF header and data This ensures smoke tests can run reliably without network dependencies. test_fixtures/minimal_test_map.sdd/ (980 bytes total) ├── mapinfo.lua (868 bytes) └── maps/TestMinimal2x2.smf (112 bytes)
1 parent c4b31c8 commit 95de1ad

File tree

3 files changed

+49
-53
lines changed

3 files changed

+49
-53
lines changed

.github/workflows/smoke-test.yml

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -71,67 +71,23 @@ jobs:
7171
cat test-data/springsettings.cfg
7272
echo "Sound subsystem disabled via Sound = 0 config"
7373
74-
- name: Create minimal test map
74+
- name: Install test map fixture
7575
run: |
76-
# Create a minimal 8x8 Spring map for testing
77-
# Map downloads are blocked (403), so we create our own minimal map
78-
mkdir -p maps/test_blank.sdd
79-
80-
# Create mapinfo.lua with minimal required fields
81-
cat > maps/test_blank.sdd/mapinfo.lua << 'MAPINFOEOF'
82-
local mapinfo = {
83-
name = "Test Blank 8x8",
84-
shortname = "test_blank_8x8",
85-
description = "Minimal test map for CI",
86-
author = "CI Auto-generated",
87-
version = "v1",
88-
mapfile = "",
89-
modtype = 3,
90-
depend = {"Map Helper v1"},
91-
replace = {},
92-
93-
maphardness = 100,
94-
notDeformable = true,
95-
gravity = 130,
96-
tidalStrength = 0,
97-
maxMetal = 0.02,
98-
extractorRadius = 64.0,
99-
voidWater = false,
100-
autoShowMetal = true,
101-
102-
smf = {
103-
minheight = 0,
104-
maxheight = 200,
105-
smtFileName0 = "",
106-
smtFileName1 = "",
107-
smtFileName2 = "",
108-
smtFileName3 = "",
109-
smtFileName4 = "",
110-
smtFileName5 = "",
111-
smtFileName6 = "",
112-
smtFileName7 = "",
113-
},
114-
115-
resources = {},
116-
custom = {},
117-
teams = {},
118-
}
119-
return mapinfo
120-
MAPINFOEOF
121-
122-
# Spring can work with just mapinfo.lua for basic testing
123-
ls -lah maps/test_blank.sdd/
124-
echo "Minimal test map created"
76+
# Use bundled minimal test map (downloads are blocked with 403)
77+
# The test map is a minimal 2x2 Spring map with proper .smf format
78+
cp -r test_fixtures/minimal_test_map.sdd games/
79+
ls -lah games/minimal_test_map.sdd/
80+
echo "Test map fixture installed"
12581
12682
- name: Create Spring script.txt
12783
run: |
128-
# Use minimal test map created above
129-
echo "Using test map: Test Blank 8x8"
84+
# Use bundled minimal test map
85+
echo "Using test map: TestMinimal2x2"
13086
cat > script.txt << 'SCRIPTEND'
13187
[GAME]
13288
{
13389
GameType=SpringBoard Core;
134-
MapName=Test Blank 8x8;
90+
MapName=TestMinimal2x2;
13591
IsHost=1;
13692
MyPlayerName=TestPlayer;
13793
[MODOPTIONS]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
-- Auto-generated minimal test map
2+
local mapinfo = {
3+
name = "TestMinimal2x2",
4+
shortname = "test_minimal_2x2",
5+
description = "Minimal 2x2 test map for CI smoke tests",
6+
author = "Auto-generated",
7+
version = "v1.0",
8+
mapfile = "maps/TestMinimal2x2.smf",
9+
modtype = 3,
10+
depend = {"Map Helper v1"},
11+
replace = {},
12+
13+
maphardness = 100,
14+
notDeformable = true,
15+
gravity = 130,
16+
tidalStrength = 0,
17+
maxMetal = 0.02,
18+
extractorRadius = 64.0,
19+
voidWater = false,
20+
autoShowMetal = true,
21+
22+
smf = {
23+
minheight = 0,
24+
maxheight = 100,
25+
smtFileName0 = "",
26+
smtFileName1 = "",
27+
smtFileName2 = "",
28+
smtFileName3 = "",
29+
smtFileName4 = "",
30+
smtFileName5 = "",
31+
smtFileName6 = "",
32+
smtFileName7 = "",
33+
},
34+
35+
resources = {},
36+
custom = {},
37+
teams = {},
38+
}
39+
40+
return mapinfo
112 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)