Skip to content

Merge pull request #59 from vicplusplus/global-leaderboards #251

Merge pull request #59 from vicplusplus/global-leaderboards

Merge pull request #59 from vicplusplus/global-leaderboards #251

Workflow file for this run

name: CI
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
pull_request:
push:
branches:
- main
- master
permissions:
checks: write
contents: read
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: '10.0.x'
- name: Restore dotnet tools
run: dotnet tool restore
- name: Check C# formatting (CSharpier)
run: dotnet csharpier check Assets/Scripts/ Assets/Tests/ server/
- name: Check file sizes (100 MB limit)
run: |
errors=0
while IFS= read -r file; do
size=$(stat -c%s "$file" 2>/dev/null) || continue
if [ "$size" -ge 104857600 ]; then
size_mb=$((size / 1048576))
echo "ERROR: $file is ${size_mb} MB (>= 100 MB). Use Git LFS or reduce file size."
errors=1
fi
done < <(git ls-files)
if [ $errors -ne 0 ]; then
exit 1
fi
echo "No oversized files found."
- name: Check meta file sync
run: |
errors=0
while IFS= read -r file; do
case "$file" in *.meta) continue ;; esac
if ! git ls-files --error-unmatch "$file.meta" > /dev/null 2>&1; then
echo "ERROR: $file tracked without its .meta file"
errors=1
fi
done < <(git ls-files -- 'Assets/*')
if [ $errors -ne 0 ]; then
exit 1
fi
echo "All Asset files have matching .meta files."
test-server:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: '10.0.x'
- name: Run server tests
run: dotnet test server/ArrowThing.Server.Tests/ArrowThing.Server.Tests.csproj --logger "console;verbosity=normal"
test:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run EditMode tests
uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
testMode: EditMode
customParameters: -nographics
test-playmode:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run PlayMode tests
uses: game-ci/unity-test-runner@0ff419b913a3630032cbe0de48a0099b5a9f0ed9 # v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
testMode: PlayMode
customParameters: --burst-disable-compilation