Skip to content
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
17 changes: 11 additions & 6 deletions .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,22 @@ jobs:
- name: List Docker images
run: docker images

- name: Run container and execute lake build
- name: Start container (in background)
run: docker run --name test-container -dti veil/latest

- name: Execute lake build
id: run-container
run: |
docker run --name test-container -dti veil/latest
set +e # stop this script from aborting if a command fails, s.t., the exit code can be captured
docker exec test-container bash -c 'cd veil && /root/.elan/bin/lake build || exit $?'
echo "exitcode=$?" >> $GITHUB_OUTPUT

- name: Stop container and cleanup docker
if: ${{ always() }}
run: |
docker stop test-container
docker rm test-container

- name: Report status
- name: Report exit code
if: ${{ steps.run-container.outcome == 'failure' }}
run: |
echo "The lake build process exited with a non-zero status."

run: echo "The lake build process exited with the non-zero exit code ${{ steps.run-container.outputs.exitcode }}."