From f4897508edeaedb71a99e244be2367b4e8e8648a Mon Sep 17 00:00:00 2001 From: Adam Saghy Date: Fri, 7 Feb 2025 23:23:51 +0100 Subject: [PATCH] FINERACT-2081: Github Actions workflow cleanup --- .github/workflows/build-docker-mariadb.yml | 8 ++------ .github/workflows/build-docker-postgresql.yml | 6 +----- .github/workflows/build-documentation.yml | 3 --- .../build-embeddable-progressive-loan-jar.yml | 6 ------ .github/workflows/build-mariadb.yml | 17 ----------------- .github/workflows/build-mysql.yml | 17 ----------------- .github/workflows/build-postgresql.yml | 17 ----------------- .github/workflows/build-tests.yml | 8 ++------ .github/workflows/publish-dockerhub.yml | 4 ---- .github/workflows/smoke-activemq.yml | 6 +----- .github/workflows/smoke-kafka.yml | 6 +----- .github/workflows/sonarqube.yml | 2 -- .github/workflows/stale.yml | 1 - 13 files changed, 7 insertions(+), 94 deletions(-) diff --git a/.github/workflows/build-docker-mariadb.yml b/.github/workflows/build-docker-mariadb.yml index c501bc3a2..7bf6ea577 100644 --- a/.github/workflows/build-docker-mariadb.yml +++ b/.github/workflows/build-docker-mariadb.yml @@ -1,16 +1,12 @@ name: Fineract Docker build - MariaDB - on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -23,9 +19,9 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:build :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber - name: Start the stack - run: docker compose up -d + run: docker compose -f docker-compose.yml up -d - name: Check the stack run: docker ps - name: Check health diff --git a/.github/workflows/build-docker-postgresql.yml b/.github/workflows/build-docker-postgresql.yml index fe0e7a739..5acb0bdd6 100644 --- a/.github/workflows/build-docker-postgresql.yml +++ b/.github/workflows/build-docker-postgresql.yml @@ -1,16 +1,12 @@ name: Fineract Docker build - PostgreSQL - on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -23,7 +19,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:build :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber - name: Start the Standalone Stack run: docker compose -f docker-compose-postgresql.yml up -d - name: Check the stack diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 19a38d503..a52ab50de 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -1,9 +1,7 @@ name: Fineract Documentation build on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 @@ -32,6 +30,5 @@ jobs: run: | sudo apt-get update sudo apt-get install ghostscript graphviz -y - - name: Documentation build run: ./gradlew --no-daemon --console=plain doc diff --git a/.github/workflows/build-embeddable-progressive-loan-jar.yml b/.github/workflows/build-embeddable-progressive-loan-jar.yml index cfc6605b3..42bad38d2 100644 --- a/.github/workflows/build-embeddable-progressive-loan-jar.yml +++ b/.github/workflows/build-embeddable-progressive-loan-jar.yml @@ -1,14 +1,10 @@ name: Fineract Build Progressive Loan Embeddable Jar & Test with a Sample Application on: [push, pull_request] - permissions: contents: read - - jobs: build: runs-on: ubuntu-24.04 - steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -35,14 +31,12 @@ jobs: javac -cp $EMBEDDABLE_JAR_FILE -d sample-app fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java env: EMBEDDABLE_JAR_FILE: ${{ env.EMBEDDABLE_JAR_FILE }} - - name: Run Schedule Generator Sample Application run: | java -cp $EMBEDDABLE_JAR_FILE:sample-app Main java -cp $EMBEDDABLE_JAR_FILE:sample-app Main 25 env: EMBEDDABLE_JAR_FILE: ${{ env.EMBEDDABLE_JAR_FILE }} - - name: Archive test results if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index 445b060f2..9a9b8c8b4 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -1,13 +1,10 @@ name: Fineract Build & Test - MariaDB on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 - services: mariad: image: mariadb:11.5 @@ -16,7 +13,6 @@ jobs: env: MARIADB_ROOT_PASSWORD: mysql options: --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3 - mock-oauth2-server: image: ghcr.io/navikt/mock-oauth2-server:2.1.10 ports: @@ -24,7 +20,6 @@ jobs: env: SERVER_PORT: 9000 JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }' - env: TZ: Asia/Kolkata DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} @@ -38,11 +33,6 @@ jobs: with: java-version: '17' distribution: 'zulu' - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 - with: - node-version: 16 - - name: Congfigure vega-cli - run: npm i -g vega-cli --unsafe - name: Setup Gradle and Validate Wrapper uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 with: @@ -67,11 +57,6 @@ jobs: sleep 10 docker exec localstack awslocal s3api create-bucket --bucket fineract-reports echo "LocalStack initialization complete" - - name: Install additional software - run: | - sudo apt-get update - sudo apt-get install ghostscript graphviz -y - - name: Build & Test env: AWS_ENDPOINT_URL: http://localhost:4566 @@ -86,7 +71,6 @@ jobs: ./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test -x :fineract-e2e-tests-runner:test ./gradlew --no-daemon --console=plain :twofactor-tests:test ./gradlew --no-daemon --console=plain :oauth2-tests:test - - name: Archive test results if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 @@ -97,7 +81,6 @@ jobs: integration-tests/build/reports/ twofactor-tests/build/reports/ oauth2-tests/build/reports/ - - name: Archive server logs if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/.github/workflows/build-mysql.yml b/.github/workflows/build-mysql.yml index 831b92f8e..f48fa7e47 100644 --- a/.github/workflows/build-mysql.yml +++ b/.github/workflows/build-mysql.yml @@ -1,13 +1,10 @@ name: Fineract Build & Test - MySQL on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 - services: mariad: image: mysql:9.1 @@ -16,7 +13,6 @@ jobs: env: MYSQL_ROOT_PASSWORD: mysql options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 - mock-oauth2-server: image: ghcr.io/navikt/mock-oauth2-server:2.1.10 ports: @@ -24,7 +20,6 @@ jobs: env: SERVER_PORT: 9000 JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }' - env: TZ: Asia/Kolkata DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} @@ -38,11 +33,6 @@ jobs: with: java-version: '17' distribution: 'zulu' - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 - with: - node-version: 16 - - name: Congfigure vega-cli - run: npm i -g vega-cli --unsafe - name: Setup Gradle and Validate Wrapper uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 with: @@ -67,11 +57,6 @@ jobs: sleep 10 docker exec localstack awslocal s3api create-bucket --bucket fineract-reports echo "LocalStack initialization complete" - - name: Install additional software - run: | - sudo apt-get update - sudo apt-get install ghostscript graphviz -y - - name: Build & Test env: AWS_ENDPOINT_URL: http://localhost:4566 @@ -86,7 +71,6 @@ jobs: ./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test :fineract-e2e-tests-runner:test -PdbType=mysql ./gradlew --no-daemon --console=plain :twofactor-tests:test -PdbType=mysql ./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=mysql - - name: Archive test results if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 @@ -97,7 +81,6 @@ jobs: integration-tests/build/reports/ twofactor-tests/build/reports/ oauth2-tests/build/reports/ - - name: Archive server logs if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/.github/workflows/build-postgresql.yml b/.github/workflows/build-postgresql.yml index 7a0237c49..5b6985a5b 100644 --- a/.github/workflows/build-postgresql.yml +++ b/.github/workflows/build-postgresql.yml @@ -1,13 +1,10 @@ name: Fineract Build & Test - PostgreSQL on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 - services: postgresql: image: postgres:17.2 @@ -17,7 +14,6 @@ jobs: POSTGRES_USER: root POSTGRES_PASSWORD: postgres options: --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3 - mock-oauth2-server: image: ghcr.io/navikt/mock-oauth2-server:2.1.10 ports: @@ -25,7 +21,6 @@ jobs: env: SERVER_PORT: 9000 JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }' - env: TZ: Asia/Kolkata DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} @@ -39,11 +34,6 @@ jobs: with: java-version: '17' distribution: 'zulu' - - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 - with: - node-version: 16 - - name: Congfigure vega-cli - run: npm i -g vega-cli --unsafe - name: Setup Gradle and Validate Wrapper uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 with: @@ -68,11 +58,6 @@ jobs: sleep 10 docker exec localstack awslocal s3api create-bucket --bucket fineract-reports echo "LocalStack initialization complete" - - name: Install additional software - run: | - sudo apt-get update - sudo apt-get install ghostscript graphviz -y - - name: Build & Test env: AWS_ENDPOINT_URL: http://localhost:4566 @@ -87,7 +72,6 @@ jobs: ./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test :fineract-e2e-tests-runner:test -PdbType=postgresql ./gradlew --no-daemon --console=plain :twofactor-tests:test -PdbType=postgresql ./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=postgresql - - name: Archive test results if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 @@ -98,7 +82,6 @@ jobs: integration-tests/build/reports/ twofactor-tests/build/reports/ oauth2-tests/build/reports/ - - name: Archive server logs if: always() uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4 diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index a66a6bb39..767cd074a 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -1,16 +1,12 @@ name: Fineract Tests - on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -23,7 +19,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:build :fineract-provider:jibDockerBuild -x test -x cucumber -x :integration-tests:test + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber - name: Start the Fineract stack run: docker compose -f docker-compose-postgresql-test-activemq.yml up -d - name: Check the stack @@ -41,4 +37,4 @@ jobs: EVENT_VERIFICATION_ENABLED: true ACTIVEMQ_BROKER_URL: tcp://localhost:61616 ACTIVEMQ_TOPIC_NAME: events - run: ./gradlew --no-daemon --console=plain -x test -x :integration-tests:test fineract-e2e-tests-runner:cucumber --tags 'not @Skip' allureReport + run: ./gradlew --no-daemon --console=plain :fineract-e2e-tests-runner:cucumber --tags 'not @Skip' allureReport diff --git a/.github/workflows/publish-dockerhub.yml b/.github/workflows/publish-dockerhub.yml index 81eddb012..7e88770a5 100644 --- a/.github/workflows/publish-dockerhub.yml +++ b/.github/workflows/publish-dockerhub.yml @@ -1,21 +1,17 @@ name: Fineract Publish to DockerHub - on: push: branches: - develop tags: - 1.* - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - name: Checkout Source Code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/smoke-activemq.yml b/.github/workflows/smoke-activemq.yml index 757100e18..085b93685 100644 --- a/.github/workflows/smoke-activemq.yml +++ b/.github/workflows/smoke-activemq.yml @@ -1,16 +1,12 @@ name: Fineract ActiveMQ Smoke - on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -23,7 +19,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:build :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber - name: Start the ActiveMQ Stack run: docker compose -f docker-compose-postgresql-activemq.yml up --scale fineract-worker=1 -d - name: Check the stack diff --git a/.github/workflows/smoke-kafka.yml b/.github/workflows/smoke-kafka.yml index 72205b78b..35aceddd6 100644 --- a/.github/workflows/smoke-kafka.yml +++ b/.github/workflows/smoke-kafka.yml @@ -1,16 +1,12 @@ name: Fineract Kafka Smoke - on: [push, pull_request] - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: @@ -23,7 +19,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 - name: Build the image - run: ./gradlew --no-daemon --console=plain :fineract-provider:clean :fineract-provider:build :fineract-provider:jibDockerBuild -x test -x cucumber + run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -x test -x cucumber - name: Start the Kafka Stack run: docker compose -f docker-compose-postgresql-kafka.yml up --scale fineract-worker=1 -d - name: Check the stack diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 927f37cd7..6cd73edc4 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -3,10 +3,8 @@ on: push: branches: - develop - permissions: contents: read - jobs: build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8ce0cc6f6..93db27b3a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,6 @@ on: - cron: "0 0 * * *" permissions: contents: read - jobs: stale: permissions: