Skip to content

Commit

Permalink
ci: add ci workflow
Browse files Browse the repository at this point in the history
re #7
  • Loading branch information
vlad-tkachenko committed Sep 22, 2023
1 parent 8a2c3b3 commit 13cfd2f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
- name: Build image
uses: docker/build-push-action@v5
22 changes: 22 additions & 0 deletions bin/1-test-keycloak.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

# navigate 1 level up the script dir
cd "$SCRIPT_DIR/.."

# start docker compose
docker-compose up -d --build

# init keycloak
cd bin
bash ./0-init-keycloak.sh
cd ..

# run tests
yarn test

# stop docker-compose
docker-compose down


3 changes: 3 additions & 0 deletions test/Base.suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export class BaseSuite {
await page.keyboard.type(process.env.KC_TEST_USER_PASSWORD);

await page.click('#kc-login');

// give 0.5s timeout for all the redirects to finish
await new Promise<void>(res => setTimeout(res, 500));
}

/**
Expand Down

0 comments on commit 13cfd2f

Please sign in to comment.