From 1a22dc5f1234e37a57d7b4f33f72cc5e15792c82 Mon Sep 17 00:00:00 2001 From: Brian Ginsburg Date: Thu, 31 Oct 2024 16:22:49 -0700 Subject: [PATCH 1/3] chore: Remove unneeded disable telemetry setting The default is false already. --- stack | 1 - 1 file changed, 1 deletion(-) diff --git a/stack b/stack index d4374e92..2745449a 100755 --- a/stack +++ b/stack @@ -10,7 +10,6 @@ OS_ARCH=$(uname -m | awk '{if ($0 ~ /arm64|aarch64/) print "arm64"; else if ($0 ############################################################################ function compose-env() { export ADMIN_ADDRESS=${@:-"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"} - export DISABLE_TELEMETRY=false } function compose-init() { From 46ec483ecbcd876c4c20645c7079d07898820acb Mon Sep 17 00:00:00 2001 From: Brian Ginsburg Date: Thu, 31 Oct 2024 16:23:55 -0700 Subject: [PATCH 2/3] chore: Add compose-up-ci and integration-tests-ci functions These functions override the local environment for CI. --- .github/workflows/test.yml | 9 ++------- stack | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf0d8446..ada9fa7a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,15 +43,10 @@ jobs: run: ./stack compose-init - name: Run stack - env: - DISABLE_TELEMETRY: true - run: ./stack compose-up -d + run: ./stack compose-up-ci -d - name: Run tests - env: - LOG_LEVEL: debug - DISABLE_TELEMETRY: true - run: ./stack integration-tests + run: ./stack integration-tests-ci - name: Display resource provider logs run: docker logs resource-provider diff --git a/stack b/stack index 2745449a..e688c437 100755 --- a/stack +++ b/stack @@ -35,12 +35,20 @@ function compose-up() { docker compose -f ./docker/docker-compose.dev.yml up "$@" } +function compose-up-ci() { + load-local-env + compose-env + export LOG_LEVEL=debug + export API_HOST= + export DISABLE_TELEMETRY=true + docker compose -f ./docker/docker-compose.dev.yml up "$@" +} + function compose-down() { compose-env docker compose -f ./docker/docker-compose.dev.yml down } - ############################################################################ # Load env variables from .local.dev ############################################################################ @@ -358,6 +366,15 @@ function integration-tests() { go test -v -count 1 . } +function integration-tests-ci() { + load-local-env + export LOG_LEVEL=debug + export API_HOST= + export DISABLE_TELEMETRY=true + cd test + go test -v -count 1 . +} + ############################################################################ # run # From 0a14c372661bb61d49f8415343e77b5563616cfb Mon Sep 17 00:00:00 2001 From: Brian Ginsburg Date: Thu, 31 Oct 2024 16:59:50 -0700 Subject: [PATCH 3/3] wip --- .github/workflows/test.yml | 2 +- stack | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ada9fa7a..9d20e8e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-node@v4 - name: Build Docker Images - run: ./stack compose-build + run: ./stack compose-build-ci - name: Initialize chain run: ./stack compose-init diff --git a/stack b/stack index e688c437..4e2ded21 100755 --- a/stack +++ b/stack @@ -35,11 +35,21 @@ function compose-up() { docker compose -f ./docker/docker-compose.dev.yml up "$@" } +function compose-build-ci() { + load-local-env + compose-env + get-build-version + export LOG_LEVEL=debug + export API_HOST="" + export DISABLE_TELEMETRY=true + docker compose -f ./docker/docker-compose.dev.yml build "$@" +} + function compose-up-ci() { load-local-env compose-env export LOG_LEVEL=debug - export API_HOST= + export API_HOST="" export DISABLE_TELEMETRY=true docker compose -f ./docker/docker-compose.dev.yml up "$@" } @@ -369,7 +379,7 @@ function integration-tests() { function integration-tests-ci() { load-local-env export LOG_LEVEL=debug - export API_HOST= + export API_HOST="" export DISABLE_TELEMETRY=true cd test go test -v -count 1 .