Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create test.yml #2

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: prepare .env
run: cp env.sample .env
- name: Build the Docker image
run: docker compose up -d
- name: Wait for HTTP 200 response
run: |
max=30
i=0
echo "Waiting for localhost to respond with status code 200..."
until curl --insecure --head --fail https://localhost:7007; do
i=$((i+1))
if [ "$i" -ge "$max" ]; then
echo "Max retries reached. Exiting."
exit 1
echo "($i/$max)Waiting for https://localhost:7007 to return HTTP 200..."
sleep 5
done
echo "RHDH is ready!"
Loading