Add test coverage for core server components: annotation scanning, routing, rate limiting, CORS, and JSON handling
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
name: Run Tests on Push and Pull Request
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
runs-on: java26
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
run: |
|
||||
SERVER_DOMAIN=$(echo "${{ github.server_url }}" | sed 's/https:\/\///')
|
||||
rm -rf "$GITHUB_WORKSPACE"/*
|
||||
git clone "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@${SERVER_DOMAIN}/${{ github.repository }}.git" "$GITHUB_WORKSPACE"
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git checkout ${{ github.sha }}
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
chmod +x ./gradlew
|
||||
|
||||
- name: Run JUnit tests
|
||||
id: run_tests
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
./gradlew test --no-daemon --stacktrace
|
||||
|
||||
- name: Upload test reports
|
||||
if: always()
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
if [ -d "build/reports/tests/test" ]; then
|
||||
echo "Test reports available in build/reports/tests/test"
|
||||
ls -la build/reports/tests/test || true
|
||||
fi
|
||||
if [ -d "build/test-results/test" ]; then
|
||||
echo "Test result XMLs:"
|
||||
ls -la build/test-results/test || true
|
||||
fi
|
||||
Reference in New Issue
Block a user