diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 4cccfce9f..84afbbf80 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -18,8 +18,6 @@ jobs: name: Tests Backend Oracle if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-24.04 - env: - FLYWAY_ENVIRONMENT: ${{ github.event_name == 'pull_request' && 'dev' || 'prod' }} steps: - uses: actions/checkout@v6 @@ -38,7 +36,7 @@ jobs: if [ -f settings.xml ]; then cp settings.xml ~/.m2/settings.xml fi - ./mvnw -s ~/.m2/settings.xml clean install -Dflyway-environment=${{ env.FLYWAY_ENVIRONMENT }} -Dserver.primary-db=oracle --no-transfer-progress checkstyle:checkstyle -P all-tests + ./mvnw -s ~/.m2/settings.xml clean install -Dserver.primary-db=oracle --no-transfer-progress checkstyle:checkstyle -P all-tests - name: Upload Oracle coverage artifact uses: actions/upload-artifact@v4 @@ -52,8 +50,6 @@ jobs: name: Tests Backend Postgres if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-24.04 - env: - FLYWAY_ENVIRONMENT: ${{ github.event_name == 'pull_request' && 'dev' || 'prod' }} steps: - uses: actions/checkout@v6 @@ -72,7 +68,7 @@ jobs: if [ -f settings.xml ]; then cp settings.xml ~/.m2/settings.xml fi - ./mvnw -s ~/.m2/settings.xml clean install -Dflyway-environment=${{ env.FLYWAY_ENVIRONMENT }} -Dserver.primary-db=postgres --no-transfer-progress checkstyle:checkstyle -P all-tests + ./mvnw -s ~/.m2/settings.xml clean install -Dflyway-environment=dev -Dserver.primary-db=postgres --no-transfer-progress checkstyle:checkstyle -P all-tests - name: Upload Postgres coverage artifact uses: actions/upload-artifact@v4 diff --git a/backend/README.md b/backend/README.md index d188e4bf7..135135d18 100644 --- a/backend/README.md +++ b/backend/README.md @@ -30,7 +30,6 @@ cd /backend #### Example for Oracle: ```bash export PRIMARY_DB=oracle -export FLYWAY_ENVIRONMENT=dev ``` #### Example for PostgreSQL: @@ -46,6 +45,8 @@ Using Maven Wrapper: ./mvnw spring-boot:run ``` +**NOTE:** There is no need to set the `FLYWAY_ENVIRONMENT` environment variable when running the Oracle-primary instance, as the goal is to run the backend deployed to the production environment. + --- ## Configuration @@ -73,9 +74,11 @@ Flyway migrations are determined by the `FLYWAY_ENVIRONMENT` variable. ### Run Tests for Oracle: ```bash -./mvnw clean install -Dflyway-environment=dev -Dserver.primary-db=oracle +./mvnw clean install -Dserver.primary-db=oracle ``` +**NOTE:** There is no need to pass the `flyway-environment` property or set the `FLYWAY_ENVIRONMENT` environment variable when running the Oracle tests, as the goal is to run the tests deployed to production. + ### Run Tests for PostgreSQL: ```bash ./mvnw clean install -Dflyway-environment=dev -Dserver.primary-db=postgres