a708da8836
CI / Run Tests (push) Failing after 3s
CI / Export Windows (push) Has been skipped
CI / Export Linux (push) Has been skipped
CI / Export Android (push) Has been skipped
Test Suite / Unit Tests (GUT) (push) Failing after 2s
Test Suite / Integration Tests (push) Failing after 2s
Test Suite / Code Style Check (push) Failing after 3s
Test Suite / Security Scan (push) Failing after 12m56s
CI / Create Release (push) Has been skipped
109 lines
3.0 KiB
YAML
109 lines
3.0 KiB
YAML
name: Test Suite
|
|
|
|
on:
|
|
push:
|
|
branches: [main, experimental, patch-release]
|
|
pull_request:
|
|
branches: [main, experimental, patch-release]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit Tests (GUT)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: firebelley/godot-action@v3
|
|
with:
|
|
godot-version: '4.6'
|
|
engine-type: standard
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libvulkan1 libx11-6 libxcursor1 libxi6 libxrandr2 libxinerama1 libxi6 libxxf86vm1 libgl1
|
|
|
|
- name: Run GUT tests
|
|
run: |
|
|
godot --headless -d --path . -s addons/gut/gut_cmdln.gd
|
|
|
|
integration-tests:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: firebelley/godot-action@v3
|
|
with:
|
|
godot-version: '4.6'
|
|
engine-type: standard
|
|
|
|
- name: Install export templates
|
|
run: |
|
|
mkdir -v -p ~/.local/share/godot/export_templates/4.6.stable
|
|
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_export_templates.tpz
|
|
unzip -q Godot_v4.6-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.6.stable
|
|
|
|
- name: Export headless server for integration tests
|
|
run: |
|
|
godot --headless --export-release "Linux/X11" build/tekton_server.x86_64
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
# Start server in background
|
|
./build/tekton_server.x86_64 --headless --port 7777 &
|
|
SERVER_PID=$!
|
|
sleep 5
|
|
|
|
# Run client tests against server
|
|
godot --headless -d --path . -s addons/gut/gut_cmdln.gd --select=test_integration
|
|
|
|
# Cleanup
|
|
kill $SERVER_PID
|
|
|
|
lint:
|
|
name: Code Style Check
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Godot
|
|
uses: firebelley/godot-action@v3
|
|
with:
|
|
godot-version: '4.6'
|
|
engine-type: standard
|
|
|
|
- name: Check GDScript formatting
|
|
run: |
|
|
godot --headless --check-only -s scripts/lint.gd || true
|
|
# Note: GDScript doesn't have a built-in formatter; this checks syntax only
|
|
|
|
security-scan:
|
|
name: Security Scan
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@master
|
|
with:
|
|
scan-type: 'fs'
|
|
scan-ref: '.'
|
|
format: 'sarif'
|
|
output: 'trivy-results.sarif'
|
|
|
|
- name: Upload Trivy results to GitHub Security
|
|
uses: github/codeql-action/upload-sarif@v3
|
|
with:
|
|
sarif_file: 'trivy-results.sarif' |