Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
EVEREST-107 Fix tests run (#185)
Browse files Browse the repository at this point in the history
* add waiting step

* go version

* add waiting step to flows

* go version & wait in cli-tests

(cherry picked from commit 2dc4a55)
  • Loading branch information
oksana-grishchenko committed Oct 22, 2023
1 parent 43bae27 commit c6b8e48
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,23 @@ jobs:
ref: 'main'
path: percona-everest-backend

- name: Set up Go release for Everest BE
uses: percona-platform/setup-go@v4
with:
go-version-file: './percona-everest-backend/go.mod'

- name: Run Everest backend
working-directory: percona-everest-backend
run: |
make local-env-up
SECRETS_ROOT_KEY=$(openssl rand -base64 32) make run-debug &
- name: Set up Go release for CLI
uses: percona-platform/setup-go@v4
with:
go-version-file: './go.mod'

- name: Build CLI binary
run: |
make init
Expand All @@ -257,6 +268,16 @@ jobs:
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
run: git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"

- name: Wait for EVEREST BE to be available
timeout-minutes: 15
run: |
while ! curl -sSf http://127.0.0.1:8080 > /dev/null; do
echo "Waiting for EVEREST BE..."
sleep 15
done
echo "EVEREST BE is available."
- name: Run integration tests
working-directory: cli-tests
id: cli-tests
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,16 @@ jobs:
ref: 'main'
path: percona-everest-backend

- name: Set up Go release for Everest BE
uses: percona-platform/setup-go@v4
with:
go-version-file: './percona-everest-backend/go.mod'

- name: Run Everest backend
working-directory: percona-everest-backend
run: |
make local-env-up
make run-debug &
SECRETS_ROOT_KEY=$(openssl rand -base64 32) make run-debug &
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
# https://minikube.sigs.k8s.io/docs/drivers/docker/
Expand All @@ -82,6 +87,11 @@ jobs:
minikube config set cpus 2
minikube start
- name: Set up Go release for CLI
uses: percona-platform/setup-go@v4
with:
go-version-file: './go.mod'

- name: Build CLI binary
run: |
make init
Expand All @@ -92,6 +102,15 @@ jobs:
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
run: git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"

- name: Wait for EVEREST BE to be available
timeout-minutes: 15
run: |
while ! curl -sSf http://127.0.0.1:8080 > /dev/null; do
echo "Waiting for EVEREST BE..."
sleep 15
done
echo "EVEREST BE is available."
- name: Run ${{ env.MAKE_TARGET }} integration tests
working-directory: cli-tests
id: cli-tests
Expand Down

0 comments on commit c6b8e48

Please sign in to comment.