Skip to content

Commit fdea16e

Browse files
committed
fix build
1 parent 66534d2 commit fdea16e

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/api-deploy-personal.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,39 @@ jobs:
9595
echo "POSTGRES_HOST=localhost" >> config/.env.local
9696
echo "ENVIRONMENT=dev" >> config/.env.local
9797
98+
- name: Start PostgreSQL (needed for db-gen)
99+
run: docker compose --env-file ./config/.env.local up -d postgres postgres-test
100+
101+
- name: Install Liquibase
102+
env:
103+
LIQUIBASE_VERSION: 4.33.0
104+
run: |
105+
curl -sSL https://github.com/liquibase/liquibase/releases/download/v${LIQUIBASE_VERSION}/liquibase-${LIQUIBASE_VERSION}.tar.gz -o liquibase.tar.gz
106+
mkdir liquibase-dist && tar -xzf liquibase.tar.gz -C liquibase-dist
107+
sudo mv liquibase-dist /usr/local/liquibase
108+
sudo ln -sf /usr/local/liquibase/liquibase /usr/local/bin/liquibase
109+
110+
- name: Run Liquibase migrations
111+
working-directory: ${{ github.workspace }}/liquibase
112+
run: |
113+
export LIQUIBASE_COMMAND_USERNAME=postgres
114+
export LIQUIBASE_COMMAND_PASSWORD=postgres
115+
export LIQUIBASE_COMMAND_URL=jdbc:postgresql://localhost:54320/MobilityDatabaseTest
116+
export LIQUIBASE_COMMAND_CHANGELOG_FILE=changelog.xml
117+
liquibase update
118+
export LIQUIBASE_COMMAND_URL=jdbc:postgresql://localhost:54320/MobilityDatabaseUsersTest
119+
export LIQUIBASE_COMMAND_CHANGELOG_FILE=changelog_user.xml
120+
liquibase update
121+
98122
- name: Generate API stubs and DB models
99123
run: |
100124
scripts/setup-openapi-generator.sh
101125
scripts/api-gen.sh
126+
scripts/api-user-service-gen.sh
102127
scripts/api-operations-gen.sh
128+
export USE_TEST_DB=true
103129
scripts/db-gen.sh
130+
scripts/db-gen-user.sh
104131
105132
- name: Build operations API function zip
106133
if: ${{ github.event.inputs.deploy_operations_api == 'true' }}

0 commit comments

Comments
 (0)