Skip to content

Commit

Permalink
Merge pull request #252 from mamercad/issue-251
Browse files Browse the repository at this point in the history
Honor docker-compose exit codes
  • Loading branch information
arm4b authored Oct 6, 2022
2 parents 9609a00 + 98b818f commit ce61c8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/st2-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

docker-compose-up:
runs-on: ubuntu-latest
needs: [docker-compose-lint]
steps:
- uses: actions/checkout@v3

Expand All @@ -32,14 +33,18 @@ jobs:
run: |
docker-compose up --detach
- name: Run st2 smoke-tests
- name: Sleep
run: |
sleep 60
docker-compose -f tests/st2tests.yaml up
- name: Run st2 smoke-tests
run: |
docker-compose --file tests/st2tests.yaml run st2test
- name: Troubleshooting the build failure
if: ${{ failure() }}
run: |
docker-compose ps
# Display logs to help troubleshoot build failures, etc
docker-compose logs --tail="500" st2api
exit 1
4 changes: 2 additions & 2 deletions tests/st2tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ load "${BATS_HELPERS_DIR}/bats-file/load.bash"
@test 'st2 version deployed and python env are as expected' {
run st2 --version
assert_success
# st2 3.3dev (9ea417346), on Python 3.6.9
# st2 3.7.0, on Python 3.8.10
assert_line --partial "st2 ${ST2_VERSION}"
assert_line --partial 'on Python 3.6.9'
assert_line --partial 'on Python 3.8.10'
}

@test 'ST2_AUTH_URL service endpoint is accessible and working' {
Expand Down

0 comments on commit ce61c8f

Please sign in to comment.