Skip to content

Commit

Permalink
chore: Add compose-up-ci and integration-tests-ci functions
Browse files Browse the repository at this point in the history
These functions override the local environment for CI.
  • Loading branch information
bgins committed Oct 31, 2024
1 parent 1a22dc5 commit 46ec483
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion stack
Original file line number Diff line number Diff line change
Expand Up @@ -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
############################################################################
Expand Down Expand Up @@ -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
#
Expand Down

0 comments on commit 46ec483

Please sign in to comment.