Skip to content

Commit 5dd6140

Browse files
committed
Add infralink seed to github action
1 parent 6acd08a commit 5dd6140

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/test-run-cypress-tests-action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
uses: actions/checkout@v3
1616

1717
- name: Start e2e env
18+
env:
19+
INFRASTRUCTURE_LINK_DUMP_PATH: infraLinks.sql
1820
uses: ./github-actions/setup-e2e-environment
1921

2022
- name: Run e2e tests from github action

github-actions/setup-e2e-environment/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,34 @@ runs:
289289
- name: Verify that all containers are healthy
290290
run: '[ -z "$(docker ps -q --filter health=unhealthy)" ]'
291291
shell: bash
292+
293+
- name: Set up PostgreSQL client
294+
shell: bash
295+
run: |
296+
sudo apt-get -yqq install postgresql-client
297+
298+
- name: Fetch infrastructure link dump
299+
shell: bash
300+
run: |
301+
curl https://raw.githubusercontent.com/HSLdevcom/jore4-ui/main/test-db-manager/src/dumps/infraLinks/infraLinks.sql \
302+
-o ${{ env.INFRASTRUCTURE_LINK_DUMP_PATH }}
303+
304+
- name: Seed db1 with infrastructure links
305+
shell: bash
306+
run: |
307+
psql postgresql://dbadmin:adminpassword@localhost:6532/jore4e2e < ${{ env.INFRASTRUCTURE_LINK_DUMP_PATH }}
308+
309+
- name: Seed db2 with infrastructure links
310+
shell: bash
311+
run: |
312+
psql postgresql://dbadmin:adminpassword@localhost:6533/jore4e2e < ${{ env.INFRASTRUCTURE_LINK_DUMP_PATH }}
313+
314+
- name: Seed db3 with infrastructure links
315+
shell: bash
316+
run: |
317+
psql postgresql://dbadmin:adminpassword@localhost:6534/jore4e2e < ${{ env.INFRASTRUCTURE_LINK_DUMP_PATH }}
318+
319+
- name: Seed db4 with infrastructure links
320+
shell: bash
321+
run: |
322+
psql postgresql://dbadmin:adminpassword@localhost:6432/jore4e2e < ${{ env.INFRASTRUCTURE_LINK_DUMP_PATH }}

0 commit comments

Comments
 (0)