forked from Olympic/NTO-2025-Backend-TeamTask
Compare commits
4 Commits
60070adad9
...
a6954c2013
| Author | SHA1 | Date | |
|---|---|---|---|
| a6954c2013 | |||
| 1a0a72ea4a | |||
| d990af90aa | |||
| 6ef11b316c |
38
.gitea/workflows/workflow.yml
Normal file
38
.gitea/workflows/workflow.yml
Normal 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
8
allowed_changes.yml
Normal 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"
|
||||||
Reference in New Issue
Block a user