mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Adds exclude_from_ci support to unit tests, again (#96545)
## About The Pull Request When I was working on #96368 I was unaware of the following: <img width="584" height="294" alt="image" src="https://github.com/user-attachments/assets/a6578a46-04e8-4316-a2d6-5aaadffbdea6" /> So I'm fixing it. ## Why It's Good For The Game Sorry downstreams ## Changelog No user facing changes
This commit is contained in:
@@ -52,6 +52,7 @@ jobs:
|
||||
uses: ./.github/workflows/perform_regular_version_tests.yml
|
||||
with:
|
||||
maps: ${{ needs.collect_data.outputs.maps }}
|
||||
map_config: ${{ needs.collect_data.outputs.map_config }}
|
||||
max_required_byond_client: ${{ needs.collect_data.outputs.max_required_byond_client }}
|
||||
|
||||
run_alternate_tests:
|
||||
|
||||
@@ -6,6 +6,9 @@ on:
|
||||
maps:
|
||||
description: "The maps that were found"
|
||||
value: ${{ jobs.collect_data.outputs.maps }}
|
||||
map_config:
|
||||
description: "The map config file to use"
|
||||
value: ${{ jobs.collect_data.outputs.map_config }}
|
||||
alternate_tests:
|
||||
description: "The alternate tests that were found"
|
||||
value: ${{ jobs.collect_data.outputs.alternate_tests }}
|
||||
@@ -22,6 +25,7 @@ jobs:
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
maps: ${{ steps.map_finder.outputs.maps }}
|
||||
map_config: ${{ steps.map_finder.outputs.map_config }}
|
||||
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
|
||||
max_required_byond_client: ${{ steps.max_required_byond_client.outputs.max_required_byond_client }}
|
||||
required_build_versions: ${{ steps.setup_required_build_versions.outputs.required_build_versions }}
|
||||
@@ -32,16 +36,27 @@ jobs:
|
||||
id: map_finder
|
||||
run: |
|
||||
> maps_output.txt
|
||||
> map_configs.txt
|
||||
|
||||
for file in _maps/*.json; do
|
||||
if ! jq -e '.exclude_from_ci == true' "$file" >/dev/null 2>&1; then
|
||||
echo "\"$(basename "$file" .json)\"" >> maps_output.txt
|
||||
map_name=$(basename "$file" .json)
|
||||
|
||||
echo "\"$map_name\"" >> maps_output.txt
|
||||
echo "map $map_name" >> map_configs.txt
|
||||
echo "endmap" >> map_configs.txt
|
||||
else
|
||||
echo "Excluded: $file"
|
||||
fi
|
||||
done
|
||||
|
||||
map_list=$(paste -sd, maps_output.txt)
|
||||
echo "Maps: $map_list"
|
||||
echo "maps={\"paths\":[$map_list]}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "map_config<<EOF" >> "$GITHUB_OUTPUT"
|
||||
cat map_configs.txt >> "$GITHUB_OUTPUT"
|
||||
echo "EOF" >> "$GITHUB_OUTPUT"
|
||||
- name: Find Alternate Tests
|
||||
id: alternate_test_finder
|
||||
run: |
|
||||
|
||||
@@ -6,6 +6,9 @@ on:
|
||||
maps:
|
||||
required: true
|
||||
type: string
|
||||
map_config:
|
||||
required: true
|
||||
type: string
|
||||
max_required_byond_client:
|
||||
required: true
|
||||
type: string
|
||||
@@ -21,4 +24,5 @@ jobs:
|
||||
|
||||
with:
|
||||
map: ${{ matrix.map }}
|
||||
map_config: ${{ inputs.map_config }}
|
||||
max_required_byond_client: ${{ inputs.max_required_byond_client }}
|
||||
|
||||
@@ -8,6 +8,9 @@ on:
|
||||
map:
|
||||
required: true
|
||||
type: string
|
||||
map_config:
|
||||
required: false
|
||||
type: string
|
||||
major:
|
||||
required: false
|
||||
type: string
|
||||
@@ -60,7 +63,7 @@ jobs:
|
||||
id: run_tests
|
||||
run: |
|
||||
source $HOME/BYOND/byond/bin/byondsetup
|
||||
bash tools/ci/run_server.sh ${{ inputs.map }}
|
||||
bash tools/ci/run_server.sh "${{ inputs.map }}" "${{ inputs.map_config }}"
|
||||
- name: Upload screenshot tests
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
Reference in New Issue
Block a user