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

fix(ci): make sure Rust tests actually run in deploy-gcp-tests.yml #4710

Merged
merged 5 commits into from
Aug 3, 2022
Merged
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
13 changes: 11 additions & 2 deletions .github/workflows/deploy-gcp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ jobs:
"


# wait for the result of the test
# check the results of the test
test-result:
# TODO: update the job name here, and in the branch protection rules
name: Run ${{ inputs.test_id }} test
Expand Down Expand Up @@ -834,7 +834,9 @@ jobs:
service_account: 'github-service-account@zealous-zebra.iam.gserviceaccount.com'
token_format: 'access_token'

# Wait for the container to finish, then exit with the test's exit status.
# Check that the container executed at least 1 Rust test harness test, and that all tests passed.
dconnolly marked this conversation as resolved.
Show resolved Hide resolved
# Then wait for the container to finish, and exit with the test's exit status.
# Also shows recent test logs.
#
# If the container has already finished, `docker wait` should return its status.
# But sometimes this doesn't work, so we use `docker inspect` as a fallback.
Expand All @@ -850,6 +852,13 @@ jobs:
--quiet \
--ssh-flag="-o ServerAliveInterval=5" \
--command=' \
set -e;
docker logs \
--tail ${{ env.EXTRA_LOG_LINES }} \
${{ inputs.test_id }} | \
tee --output-error=exit /dev/stderr | \
grep --max-count=1 --extended-regexp --color=always \
"test result: .*ok.* [1-9][0-9]* passed.*finished in"; \
EXIT_STATUS=$( \
docker wait ${{ inputs.test_id }} || \
docker inspect --format "{{.State.ExitCode}}" ${{ inputs.test_id }} || \
Expand Down