-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): add basic info about Docker Compose
test: test Docker service
- Loading branch information
1 parent
16ea671
commit a14a5cd
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Run Docker test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
docker-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Run Docker integration tests | ||
run: | | ||
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/4.0.0/hurl_4.0.0_amd64.deb | ||
sudo dpkg -i hurl_4.0.0_amd64.deb | ||
bin/integration.sh http://localhost:3000/auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
wait_for_url () { | ||
echo "Testing $1..." | ||
printf 'GET %s\nHTTP 200' "$1" | hurl --retry "$2" > /dev/null; | ||
return 0 | ||
} | ||
|
||
echo "Starting container..." | ||
docker compose up --detach --build | ||
|
||
echo "Waiting for server to be ready..." | ||
wait_for_url "$1" 60 | ||
|
||
echo "Stopping container..." | ||
docker compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
services: | ||
idrc-cms-authenticator: | ||
build: . | ||
container_name: "auth-incd-ca" | ||
env_file: .env.test | ||
ports: | ||
- "3000:3000" |