Files
tekton/.gitea/workflows/test.yml
T
GMaysa 58b66bcb8f
CI / Export Windows (push) Failing after 36s
CI / Export Linux (push) Failing after 36s
CI / Export Android (push) Failing after 30s
Test Suite / Unit Tests (GUT) (push) Failing after 32s
Test Suite / Integration Tests (push) Failing after 29s
Test Suite / Code Style Check (push) Failing after 29s
CI / Create Release (push) Has been skipped
Test Suite / Security Scan (push) Failing after 35s
ci: update SSH config setup to append instead of using sudo tee for Gitea
2026-07-02 17:23:04 +08:00

137 lines
4.5 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: Setup SSH config for Gitea
run: |
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- 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
mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot
chmod +x /usr/local/bin/godot
- name: Install dependencies
run: |
apt-get update
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: Setup SSH config for Gitea
run: |
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- 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
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: Setup SSH config for Gitea
run: |
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- 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
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: Setup SSH config for Gitea
run: |
echo -e "Host gitea\n HostName 100.79.174.108\n Port 222\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- 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'