44 push :
55 branches :
66 - develop
7-
87permissions :
98 contents : read
10-
119jobs :
12- test :
10+ build :
1311 runs-on : ubuntu-24.04
1412 timeout-minutes : 180
1513
@@ -22,25 +20,16 @@ jobs:
2220 POSTGRES_USER : root
2321 POSTGRES_PASSWORD : postgres
2422 options : --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3
25-
2623 mock-oauth2-server :
2724 image : ghcr.io/navikt/mock-oauth2-server:2.1.10
2825 ports :
2926 - 9000:9000
3027 env :
3128 SERVER_PORT : 9000
3229 JSON_CONFIG : ' { "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'
33-
3430 env :
3531 TZ : Asia/Kolkata
3632 DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
37- AWS_ENDPOINT_URL : http://localhost:4566
38- AWS_ACCESS_KEY_ID : localstack
39- AWS_SECRET_ACCESS_KEY : localstack
40- AWS_REGION : us-east-1
41- FINERACT_REPORT_EXPORT_S3_ENABLED : true
42- FINERACT_REPORT_EXPORT_S3_BUCKET_NAME : fineract-reports
43-
4433 steps :
4534 - name : Checkout
4635 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
@@ -53,52 +42,63 @@ jobs:
5342 with :
5443 java-version : ' 21'
5544 distribution : ' zulu'
56-
57- - name : Cache Gradle dependencies
58- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
59- with :
60- path : |
61- ~/.gradle/caches
62- ~/.gradle/wrapper
63- key : gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
64-
6545 - name : Setup Gradle and Validate Wrapper
6646 uses : gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
6747 with :
6848 validate-wrappers : true
69-
7049 - name : Verify PostgreSQL connection
7150 run : |
7251 while ! pg_isready -d postgres -U root -h 127.0.0.1 -p 5432 ; do
73- sleep 1
52+ sleep 1
7453 done
75-
7654 - name : Initialise databases
7755 run : |
7856 ./gradlew --no-daemon -q createPGDB -PdbName=fineract_tenants
7957 ./gradlew --no-daemon -q createPGDB -PdbName=fineract_default
8058
8159 - name : Start LocalStack
60+ env :
61+ AWS_ENDPOINT_URL : http://localhost:4566
62+ AWS_ACCESS_KEY_ID : localstack
63+ AWS_SECRET_ACCESS_KEY : localstack
64+ AWS_REGION : us-east-1
8265 run : |
8366 docker run -d --name localstack -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:2.1
8467 sleep 10
8568 docker exec localstack awslocal s3api create-bucket --bucket fineract-reports
86-
87- - name : Run Gradle Task
69+ echo "LocalStack initialization complete"
70+ - name : Build & Test
71+ env :
72+ AWS_ENDPOINT_URL : http://localhost:4566
73+ AWS_ACCESS_KEY_ID : localstack
74+ AWS_SECRET_ACCESS_KEY : localstack
75+ AWS_REGION : us-east-1
76+ FINERACT_REPORT_EXPORT_S3_ENABLED : true
77+ FINERACT_REPORT_EXPORT_S3_BUCKET_NAME : fineract-reports
8878 run : |
89- ./gradlew test -PdbType=postgresql -x :fineract-e2e-tests-runner:test -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x spotlessCheck -x spotlessApply -x spotbugsMain -x spotbugsTest -x javadoc -x javadocJar -x modernizer
79+ ./gradlew --no-daemon --console=plain build -x cucumber -x test -x doc
80+ ./gradlew --no-daemon --console=plain cucumber -x :fineract-e2e-tests-runner:cucumber
81+ ./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test -x :fineract-e2e-tests-runner:test -PdbType=postgresql
82+ ./gradlew --no-daemon --console=plain :twofactor-tests:test -PdbType=postgresql
83+ ./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=postgresql
9084 - name : Archive test results
9185 if : always()
9286 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
9387 with :
9488 name : test-results
95- path : ' **/build/reports/'
9689 retention-days : 5
97-
90+ path : |
91+ build/reports/
92+ integration-tests/build/reports/
93+ twofactor-tests/build/reports/
94+ oauth2-tests/build/reports/
9895 - name : Archive server logs
9996 if : always()
10097 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
10198 with :
10299 name : server-logs
103- path : ' **/build/cargo/'
104100 retention-days : 5
101+ path : |
102+ integration-tests/build/cargo/
103+ twofactor-tests/build/cargo/
104+ oauth2-tests/build/cargo/
0 commit comments