Skip to content

Commit

Permalink
ci: make clean-test-output a script for reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Mar 14, 2023
1 parent 9282cf7 commit c70fac0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,15 @@ jobs:

- run: cargo test
- name: Clear intermediate test output
run: |
df -h
rm -rf target/tmp
df -h
run: ci/clean-test-output.sh
- name: gitoxide tests (all git-related tests)
run: cargo test git
env:
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1
# The testsuite generates a huge amount of data, and fetch-smoke-test was
# running out of disk space.
- name: Clear test output
run: |
df -h
rm -rf target/tmp
df -h
run: ci/clean-test-output.sh
- name: Check operability of rustc invocation with argfile
env:
__CARGO_TEST_FORCE_ARGFILE: 1
Expand Down Expand Up @@ -151,10 +145,7 @@ jobs:
# The testsuite generates a huge amount of data, and fetch-smoke-test was
# running out of disk space.
- name: Clear benchmark output
run: |
df -h
rm -rf target/tmp
df -h
run: ci/clean-test-output.sh
- name: Fetch smoke test
run: ci/fetch-smoke-test.sh

Expand Down
8 changes: 8 additions & 0 deletions ci/clean-test-output.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# This script remove test and benchmark output and displays disk usage.

set -euo pipefail

df -h
rm -rf target/tmp
df -h

0 comments on commit c70fac0

Please sign in to comment.