diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf0d8446..9d20e8e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,21 +37,16 @@ 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 - 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 d4374e92..4e2ded21 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() { @@ -36,12 +35,30 @@ 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 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 ############################################################################ @@ -359,6 +376,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 #