Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ cd <repo-directory>/backend
#### Example for Oracle:
```bash
export PRIMARY_DB=oracle
export FLYWAY_ENVIRONMENT=dev
```

#### Example for PostgreSQL:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading