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

chore: Update CI environment #422

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
11 changes: 3 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 28 additions & 2 deletions stack
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
############################################################################
Expand Down Expand Up @@ -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
#
Expand Down
Loading