Skip to content

Commit

Permalink
e2e: Write node Docker container logs to a file (#4118)
Browse files Browse the repository at this point in the history
* Write node Docker container logs to a file

* add documentation

* add documentation
  • Loading branch information
anhductn2001 authored Jan 31, 2023
1 parent 386c9f0 commit d28c741
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,21 @@ jobs:
if: env.GIT_DIFF
-
name: Test e2e and Upgrade
run: make test-e2e-ci
run: make test-e2e-debug
if: env.GIT_DIFF
-
name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
-
name: Upload logs to GitHub
uses: actions/upload-artifact@v2
with:
name: logs.tgz
path: ./logs.tgz
if: failure()
6 changes: 5 additions & 1 deletion tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,8 @@ This section contains information about debugging osmosis's `e2e` tests.
docker logs < container name/id >
```
Example: `docker logs osmo-test-a-node-prune-nothing-snapshot` will print logs emitted by container `osmo-test-a-node-prune-nothing-snapshot` to your standard output.
Example: `docker logs osmo-test-a-node-prune-nothing-snapshot` will print logs emitted by container `osmo-test-a-node-prune-nothing-snapshot` to your standard output.
3. Viewing docker container logs when run osmosis's `e2e` tests in CI

When a failure occurs in CI, we have persists these log files of all container running as artifacts `logs.tgz.`

0 comments on commit d28c741

Please sign in to comment.