Compare commits

...

4 Commits

Author SHA1 Message Date
a6954c2013 Update .gitea/workflows/workflow.yml 2025-11-24 17:17:06 +00:00
1a0a72ea4a Add allowed_changes.yml 2025-11-24 17:06:17 +00:00
d990af90aa Update .gitea/workflows/workflow.yml 2025-11-24 16:55:04 +00:00
6ef11b316c Add .gitea/workflows/workflow.yml 2025-11-24 16:40:06 +00:00
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
name: Android Test
on:
pull_request:
branches: [ main ]
jobs:
validate-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout PR code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Validate allowed changes
run: |
python3 /opt/scripts/validate-changes.py
env:
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_BASE_REF: ${{ gitea.event.pull_request.base.ref }}
GITEA_HEAD_REF: ${{ gitea.event.pull_request.head.ref }}
- name: Checkout tests
run: python3 /opt/scripts/copy-tests.py --repo-url "Olympic/NTO-2025-Backend-TeamTask-tests" --branch "main" --task-type "spring"
- name: Run tests
run: mvn test
- name: Upload test results
uses: christopherHX/gitea-upload-artifact@v4
with:
name: test-results
path: target/surefire-reports
if-no-files-found: ignore
retention-days: 30
if: always()

8
allowed_changes.yml Normal file
View File

@@ -0,0 +1,8 @@
version: 1
allowed_files:
- "src/main/java/com/example/nto/*"
- "src/main/resources/*"
forbidden_files:
- "src/main/resources/application.yml"
- "src/main/resources/db.changelog/*"
- "pom.xml"