Skip to content

Commit

Permalink
ci relied on previously mapped port, testing alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
bciaraldi committed Oct 7, 2024
1 parent 6784bcc commit 37dc9d9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ jobs:
# Use PostHog Bot token when not on forks to enable proper snapshot updating
token: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.POSTHOG_BOT_GITHUB_TOKEN || github.token }}

- name: Install curl
# Used to check if ClickHouse is up within the docker network vs exposing the host port
if: needs.changes.outputs.backend == 'true'
run: |
sudo apt-get update
sudo apt-get install -y curl
- uses: ./.github/actions/run-backend-tests
if: needs.changes.outputs.backend == 'true'
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ jobs:
with:
node-version: 18.12.1

- name: Install curl
# Used to check if ClickHouse is up within the docker network vs exposing the host port
if: needs.changes.outputs.shouldTriggerCypress == 'true'
run: |
sudo apt-get update
sudo apt-get install -y curl
- name: Get pnpm cache directory path
if: needs.changes.outputs.shouldTriggerCypress == 'true'
id: pnpm-cache-dir
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-plugin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ jobs:
if: needs.changes.outputs.plugin-server == 'true'
uses: actions/checkout@v3

- name: Install curl
# Used to check if ClickHouse is up within the docker network vs exposing the host port
if: needs.changes.outputs.plugin-server == 'true'
run: |
sudo apt-get update
sudo apt-get install -y curl
- name: Stop/Start stack with Docker Compose
if: needs.changes.outputs.plugin-server == 'true'
run: |
Expand Down
4 changes: 2 additions & 2 deletions bin/check_kafka_clickhouse_up
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while true; do
nc -z localhost 9092 && break || echo 'Checking Kafka status...' && sleep 1
done

# Check ClickHouse
# Check ClickHouse within Docker Compose network using the service name 'clickhouse'
while true; do
curl -s -o /dev/null -I 'http://localhost:8123/' && break || echo 'Checking ClickHouse status...' && sleep 1
curl -s -o /dev/null -I 'http://clickhouse:8123/' && break || echo 'Checking ClickHouse status...' && sleep 1
done

0 comments on commit 37dc9d9

Please sign in to comment.