Skip to content

[CORE-69]: Bump the minor-patch-dependencies group across 1 directory with 18 updates #624

[CORE-69]: Bump the minor-patch-dependencies group across 1 directory with 18 updates

[CORE-69]: Bump the minor-patch-dependencies group across 1 directory with 18 updates #624

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Run Tests
on:
workflow_dispatch: {}
push:
branches: [ master ]
paths-ignore: [ '**.md' ]
pull_request:
# Branch settings require status checks before merging, so don't add paths-ignore.
branches: [ master ]
env:
JANITOR_APP_SA_FILE: src/test/resources/rendered/sa-account.json
JANITOR_CLIENT_SA_FILE: src/test/resources/rendered/client-sa-account.json
JANITOR_CLIENT_SA_TOOLS_FILE: src/test/resources/rendered/tools-client-sa-account.json
JANITOR_CLOUD_ACCESS_SA_FILE: src/test/resources/rendered/cloud-access-sa-account.json
jobs:
unit-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.6
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Skip version bump merges
id: skiptest
uses: ./.github/actions/bump-skip
with:
event-name: ${{ github.event_name }}
- name: Render secrets for tests
if: steps.skiptest.outputs.is-bump == 'no'
run: |
JANITOR_APP_SA_B64=${{ secrets.JANITOR_APP_SA }}
echo ::add-mask::$JANITOR_APP_SA_B64
JANITOR_APP_SA=$(echo $JANITOR_APP_SA_B64 | base64 --decode)
echo ::add-mask::$JANITOR_APP_SA
echo $JANITOR_APP_SA > $JANITOR_APP_SA_FILE
JANITOR_CLIENT_SA_B64=${{ secrets.JANITOR_CLIENT_SA }}
echo ::add-mask::$JANITOR_CLIENT_SA_B64
JANITOR_CLIENT_SA=$(echo $JANITOR_CLIENT_SA_B64 | base64 --decode)
echo ::add-mask::$JANITOR_CLIENT_SA
echo $JANITOR_CLIENT_SA > $JANITOR_CLIENT_SA_FILE
JANITOR_CLIENT_SA_TOOLS_B64=${{ secrets.JANITOR_CLIENT_SA_TOOLS }}
echo ::add-mask::$JANITOR_CLIENT_SA_TOOLS_B64
JANITOR_CLIENT_SA_TOOLS=$(echo $JANITOR_CLIENT_SA_TOOLS_B64 | base64 --decode)
echo ::add-mask::$JANITOR_CLIENT_SA_TOOLS
echo $JANITOR_CLIENT_SA_TOOLS > $JANITOR_CLIENT_SA_TOOLS_FILE
JANITOR_CLOUD_ACCESS_SA_B64=${{ secrets.JANITOR_CLOUD_ACCESS_SA }}
echo ::add-mask::JANITOR_CLOUD_ACCESS_SA_B64
JANITOR_CLOUD_ACCESS_SA=$(echo $JANITOR_CLOUD_ACCESS_SA_B64 | base64 --decode)
echo ::add-mask::$JANITOR_CLOUD_ACCESS_SA
echo $JANITOR_CLOUD_ACCESS_SA > $JANITOR_CLOUD_ACCESS_SA_FILE
- name: Initialize Postgres DB
if: steps.skiptest.outputs.is-bump == 'no'
env:
PGPASSWORD: postgres
run: psql -h 127.0.0.1 -U postgres -f ./local-dev/local-postgres-init.sql
- name: Set up JDK 17
if: steps.skiptest.outputs.is-bump == 'no'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Grant execute permission for gradlew
if: steps.skiptest.outputs.is-bump == 'no'
run: chmod +x gradlew
- name: Check Javadoc
if: steps.skiptest.outputs.is-bump == 'no'
run: ./gradlew javadoc --scan
- name: Run unit tests
if: steps.skiptest.outputs.is-bump == 'no'
id: unit-test
run: ./gradlew unitTest --scan
- name: Run integration tests
if: steps.skiptest.outputs.is-bump == 'no'
id: integration-test
run: ./gradlew integrationTest --scan
- name: Upload Test Reports
if: always() && steps.skiptest.outputs.is-bump == 'no'
uses: actions/upload-artifact@v4
with:
name: Test Reports
path: build/reports/tests