Bump actions/upload-artifact from 7.0.0 to 7.0.1 #2638
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Verify Liquibase Backward Compatibility | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| liquibase-backward-compatibility-check: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| services: | |
| postgresql: | |
| image: postgres:18.3 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: root | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd="pg_isready -q -d postgres -U root" | |
| --health-interval=5s | |
| --health-timeout=2s | |
| --health-retries=5 | |
| env: | |
| DB_USER: root | |
| DB_PASSWORD: postgres | |
| DB_NAME: fineract_default | |
| TZ: Asia/Kolkata | |
| steps: | |
| - name: Checkout base commit | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: ${{ github.event.pull_request.base.repo.full_name }} | |
| ref: ${{ github.event.pull_request.base.sha }} | |
| fetch-depth: 0 | |
| path: baseline | |
| - name: Checkout PR merge commit | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| path: current | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| - name: Wait for PostgreSQL | |
| run: | | |
| until pg_isready -h localhost -U $DB_USER; do | |
| echo "Waiting for postgres..." | |
| sleep 2 | |
| done | |
| - name: Init base schema | |
| working-directory: baseline | |
| run: | | |
| ./gradlew --no-daemon createPGDB -PdbName=fineract_tenants | |
| ./gradlew --no-daemon createPGDB -PdbName=$DB_NAME | |
| - name: Print checked out revisions | |
| run: | | |
| echo "Base branch ref: ${{ github.event.pull_request.base.ref }}" | |
| echo "Base branch event SHA:" | |
| echo "${{ github.event.pull_request.base.sha }}" | |
| echo "PR head SHA:" | |
| echo "${{ github.event.pull_request.head.sha }}" | |
| echo "GitHub merge SHA:" | |
| echo "${{ github.sha }}" | |
| echo "Baseline revision:" | |
| git -C baseline rev-parse HEAD | |
| git -C baseline log -1 --oneline | |
| echo "Merged PR revision:" | |
| git -C current rev-parse HEAD | |
| git -C current log -1 --oneline | |
| - name: Start backend on base commit | |
| working-directory: baseline | |
| run: | | |
| ./gradlew :fineract-provider:devRun --args="\ | |
| --spring.datasource.hikari.driverClassName=org.postgresql.Driver \ | |
| --spring.datasource.hikari.jdbcUrl=jdbc:postgresql://localhost:5432/fineract_tenants \ | |
| --spring.datasource.hikari.username=root \ | |
| --spring.datasource.hikari.password=postgres \ | |
| --fineract.tenant.host=localhost \ | |
| --fineract.tenant.port=5432 \ | |
| --fineract.tenant.username=root \ | |
| --fineract.tenant.password=postgres" & | |
| BACKEND_PID=$! | |
| echo $BACKEND_PID > backend.pid | |
| # Wait for Actuator to come up (adjust host/port/path if needed) | |
| ACTUATOR_URL="https://localhost:8443/fineract-provider/actuator/health" | |
| TIMEOUT_SECONDS=600 | |
| INTERVAL_SECONDS=2 | |
| echo "Waiting for backend Actuator: $ACTUATOR_URL (timeout ${TIMEOUT_SECONDS}s)..." | |
| start_ts=$(date +%s) | |
| while true; do | |
| if ! kill -0 "$BACKEND_PID" 2>/dev/null; then | |
| echo "Backend process exited before Actuator became available." | |
| exit 1 | |
| fi | |
| if curl -kfsS "$ACTUATOR_URL" >/dev/null 2>&1; then | |
| echo "Actuator is up." | |
| break | |
| fi | |
| now_ts=$(date +%s) | |
| if [ $((now_ts - start_ts)) -ge "$TIMEOUT_SECONDS" ]; then | |
| echo "Timed out waiting for Actuator." | |
| exit 1 | |
| fi | |
| sleep "$INTERVAL_SECONDS" | |
| done | |
| - name: Stop baseline backend | |
| if: always() | |
| working-directory: baseline | |
| run: | | |
| kill $(cat backend.pid) | |
| sleep 10 | |
| - name: Start backend on merged PR commit | |
| working-directory: current | |
| run: | | |
| ./gradlew :fineract-provider:devRun --args="\ | |
| --spring.datasource.hikari.driverClassName=org.postgresql.Driver \ | |
| --spring.datasource.hikari.jdbcUrl=jdbc:postgresql://localhost:5432/fineract_tenants \ | |
| --spring.datasource.hikari.username=root \ | |
| --spring.datasource.hikari.password=postgres \ | |
| --fineract.tenant.host=localhost \ | |
| --fineract.tenant.port=5432 \ | |
| --fineract.tenant.username=root \ | |
| --fineract.tenant.password=postgres" & | |
| BACKEND_PID=$! | |
| echo $BACKEND_PID > backend.pid | |
| # Wait for Actuator to come up (adjust host/port/path if needed) | |
| ACTUATOR_URL="https://localhost:8443/fineract-provider/actuator/health" | |
| TIMEOUT_SECONDS=600 | |
| INTERVAL_SECONDS=2 | |
| echo "Waiting for backend Actuator: $ACTUATOR_URL (timeout ${TIMEOUT_SECONDS}s)..." | |
| start_ts=$(date +%s) | |
| while true; do | |
| if ! kill -0 "$BACKEND_PID" 2>/dev/null; then | |
| echo "Backend process exited before Actuator became available." | |
| exit 1 | |
| fi | |
| if curl -kfsS "$ACTUATOR_URL" >/dev/null 2>&1; then | |
| echo "Actuator is up." | |
| break | |
| fi | |
| now_ts=$(date +%s) | |
| if [ $((now_ts - start_ts)) -ge "$TIMEOUT_SECONDS" ]; then | |
| echo "Timed out waiting for Actuator." | |
| exit 1 | |
| fi | |
| sleep "$INTERVAL_SECONDS" | |
| done | |
| - name: Stop PR backend | |
| if: always() | |
| working-directory: current | |
| run: | | |
| kill $(cat backend.pid) | |
| sleep 10 |