forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 6
193 lines (181 loc) · 6.38 KB
/
test.yml
File metadata and controls
193 lines (181 loc) · 6.38 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: Run Tests
env:
CACHE_PREFIX: "test-1.1.0" # Update when this file is changed
BYOND_SOURCE: "https://indm.dev/byond" # Canonical: "https://www.byond.com/download/build"
BYOND_MAJOR: "516"
BYOND_MINOR: "1669"
SDMM_TARGET: "suite-1.11"
permissions:
contents: read
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
preflight:
name: Check Test Requirements
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d
id: filter
with:
filters: .github/workflow-config/preflight-filters.yml
outputs:
byond: ${{ steps.filter.outputs.byond }}
dreamchecker:
name: Dreamchecker
runs-on: ubuntu-22.04
needs:
- preflight
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Check dreamchecker cache
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7
id: check-cache
with:
path: ~/spaceman_dmm/${{ env.SDMM_TARGET }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-spacemandmm-${{ env.SDMM_TARGET }}
- name: Apply dreamchecker cache
if: ${{ steps.check-cache.outputs.cache-hit }}
run: |
cp ~/spaceman_dmm/${{ env.SDMM_TARGET }}/dreamchecker ~
chmod +x ~/dreamchecker
- name: Fetch dreamchecker
if: ${{ !steps.check-cache.outputs.cache-hit }}
run: |
wget -O ~/dreamchecker "https://github.com/SpaceManiac/SpacemanDMM/releases/download/${{ env.SDMM_TARGET }}/dreamchecker"
mkdir -p ~/spaceman_dmm/${{ env.SDMM_TARGET }}/
cp ~/dreamchecker ~/spaceman_dmm/${{ env.SDMM_TARGET }}/
chmod +x ~/dreamchecker
- name: Cache dreamchecker
if: ${{ !steps.check-cache.outputs.cache-hit && success() }}
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/spaceman_dmm/${{ env.SDMM_TARGET }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-spacemandmm-${{ env.SDMM_TARGET }}
- name: Run Dreamchecker
run: ~/dreamchecker
install_byond:
name: Install BYOND
runs-on: ubuntu-22.04
needs:
- preflight
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Check Cached BYOND
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7
id: check-cache
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install Byond
if: ${{ !steps.check-cache.outputs.cache-hit }}
run: |
sudo apt-get update
sudo apt-get -y install file unzip
chmod +x test/install-byond.sh
test/install-byond.sh
- name: Save BYOND Cache
if: ${{ !steps.check-cache.outputs.cache-hit && success() }}
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
code_health:
name: Code Health & Style
runs-on: ubuntu-22.04
needs:
- preflight
- dreamchecker
- install_byond
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y uchardet
- name: Run Tests
env:
TEST: CODE
run: test/run-test.sh
map_example:
name: Unit Tests - Example Map
runs-on: ubuntu-22.04
needs:
- preflight
- dreamchecker
- install_byond
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libcurl4:i386
- name: Run Tests
env:
TEST: MAP
MAP_PATH: example
run: test/run-test.sh
map_torch:
name: Unit Tests - Torch Map
runs-on: ubuntu-22.04
needs:
- preflight
- dreamchecker
- install_byond
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libcurl4:i386
- name: Run Tests
env:
TEST: MAP
MAP_PATH: torch
run: test/run-test.sh
map_dynamic:
name: Unit Tests - Sites & Ruins
runs-on: ubuntu-22.04
needs:
- preflight
- dreamchecker
- install_byond
if: needs.preflight.outputs.byond == 'true'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ env.CACHE_PREFIX }}-${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libcurl4:i386
- name: Run Tests
env:
TEST: MAP
MAP_PATH: away_sites_testing
run: test/run-test.sh