diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index c1e4ba0b..3d213447 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -19,9 +19,9 @@ jobs: postgres: image: postgres env: - POSTGRES_USER: la-doc-uploader-test - POSTGRES_DB: la-doc-uploader-test + POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + POSTGRES_DB: mdbenefits_test options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - 5432:5432 @@ -40,7 +40,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Test with Gradle - run: ./gradlew clean test --stacktrace + run: SPRING_PROFILES_ACTIVE=ci ./gradlew clean test --stacktrace - name: Cache Gradle packages uses: actions/cache@v3 with: @@ -70,8 +70,8 @@ jobs: postgres: image: postgres env: - POSTGRES_USER: la-doc-uploader-test - POSTGRES_DB: la-doc-uploader-test + POSTGRES_USER: postgres + POSTGRES_DB: mdbenefits_test POSTGRES_PASSWORD: postgres options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: @@ -99,8 +99,8 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Test with Gradle - run: ./gradlew accessibilityTest + run: SPRING_PROFILES_ACTIVE=ci ./gradlew accessibilityTest - name: Cleanup Gradle Cache run: | rm -f ~/.gradle/caches/modules-2/modules-2.lock - rm -f ~/.gradle/caches/modules-2/gc.properties \ No newline at end of file + rm -f ~/.gradle/caches/modules-2/gc.properties diff --git a/src/main/resources/application-ci.yaml b/src/main/resources/application-ci.yaml new file mode 100644 index 00000000..e1d2987e --- /dev/null +++ b/src/main/resources/application-ci.yaml @@ -0,0 +1,37 @@ +form-flow: + disabled-flows: ~ + uploads: + default-doc-type: "NotSet" + accepted-file-types: '.jpeg,.jpg,.png,.pdf,.bmp,.gif,.doc,.docx,.odt,.ods,.odp' + thumbnail-width: '54' + thumbnail-height: '50' + max-files: '5' # 5 files maximum + max-file-size: '1' # 1 MB file size limit + address-validation: + disabled: true +spring: + messages: + basename: messages, messages-form-flow + datasource: + username: postgres + password: postgres + url: jdbc:postgresql://localhost:5432/mdbenefits_test + flyway: + baselineOnMigrate: true + clean-on-validation-error: true + placeholders: + uuid_function: "gen_random_uuid" + user_file_doc_type_default_label: ${form-flow.uploads.default-doc-type-label:#{null}} + clean-disabled: false + thymeleaf: + prefix: classpath:/templates/ + jpa: + hibernate: + ddl-auto: create-drop + main: + allow-circular-references: true + session: + store-type: jdbc + timeout: 72h + jdbc: + initialize-schema: always diff --git a/src/test/resources/application-test.yaml b/src/main/resources/application-test.yaml similarity index 100% rename from src/test/resources/application-test.yaml rename to src/main/resources/application-test.yaml