Files
tekton/.gitea/workflows/test.yml
T
GMaysa e539a862d5
CI / Export Windows (push) Failing after 43s
CI / Export Linux (push) Failing after 1m4s
CI / Export Android (push) Failing after 55s
Test Suite / Unit Tests (GUT) (push) Failing after 39s
Test Suite / Integration Tests (push) Failing after 46s
Test Suite / Code Style Check (push) Failing after 46s
CI / Create Release (push) Has been skipped
Test Suite / Security Scan (push) Failing after 1m1s
Clean the yml script
2026-07-02 16:40:52 +08:00

121 lines
3.8 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
with:
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
ssh-strict: false
- name: Setup Godot
run: |
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
unzip -q Godot_v4.6-stable_linux.x86_64.zip
sudo mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
chmod +x /usr/local/bin/godot
- 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
with:
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
ssh-strict: false
- name: Setup Godot
run: |
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
unzip -q Godot_v4.6-stable_linux.x86_64.zip
sudo mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
chmod +x /usr/local/bin/godot
- 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=$!
trap 'kill $SERVER_PID 2>/dev/null' EXIT
sleep 5
# Run client tests against server
godot --headless -d --path . -s addons/gut/gut_cmdln.gd --select=test_integration
lint:
name: Code Style Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
ssh-strict: false
- name: Setup Godot
run: |
wget -q https://github.com/godotengine/godot-builds/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip
unzip -q Godot_v4.6-stable_linux.x86_64.zip
sudo mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
chmod +x /usr/local/bin/godot
- name: Check GDScript syntax
run: |
godot --headless -s scripts/lint.gd
security-scan:
name: Security Scan
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.TEKTON_SSH_KEY }}
ssh-strict: false
- 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'