Skip to content

feat: add REST and LONG_REST card #93

feat: add REST and LONG_REST card

feat: add REST and LONG_REST card #93

Workflow file for this run

name: Game Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21' ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev
- name: Test Game Content
run: |
bash -c '
changed_files=$(git diff --name-only --diff-filter=ACMRTUXB HEAD~1 | grep -E "\.go$|\.lua$")
if [ -z "$changed_files" ]; then
echo "No .go or .lua files were modified. Exiting."
echo "" > TestResults-${{ matrix.go-version }}.json
exit 0
else
echo "Changes found in .go or .lua files. Running tests."
EOE_TESTER_WORKING_DIR=$(pwd) go test ./cmd/internal/tester -v
fi
'
- name: Build Fuzzy Tester
run: go build -o ./fuzzy_tester ./cmd/internal/fuzzy_tester
- name: Running Fuzzy Tester
run: |
bash -c '
changed_files=$(git diff --name-only --diff-filter=ACMRTUXB HEAD~1 | grep -E "\.go$|\.lua$")
if [ -z "$changed_files" ]; then
echo "No .go or .lua files were modified. Exiting."
exit 0
else
echo "Changes found in .go or .lua files. Running fuzzy tester."
./fuzzy_tester -n 2 -timeout 30s
fi
'