aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-01-31 17:57:04 +0100
committerDavid Sterba <dsterba@suse.com>2024-01-31 18:35:31 +0100
commit328e3e632cfd1743f04586c167c56cd2b0c318fa (patch)
tree9a95fcbf1f5795ac574b7f48f922bcf71d986fb5
parent0f89b1d09879f5dd7492f3a11621004b45bafffd (diff)
downloadbtrfs-progs-328e3e632cfd1743f04586c167c56cd2b0c318fa.tar.gz
btrfs-progs: ci: save test logs to artifacts on failure
Wherever it makes sense, save the logs as artifacts when something fails (most likely the main step with real tests). Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--.github/workflows/coverage.yml7
-rw-r--r--.github/workflows/devel.yml42
-rw-r--r--.github/workflows/pull-request.yml7
3 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index cbd15d5c..3aea8cd5 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -55,3 +55,10 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/lcov-info
+ - name: Save logs on failure
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-results
+ path: "tests/*-results.txt"
+ if-no-files-found: ignore
diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml
index b810cdcb..aca6ed97 100644
--- a/.github/workflows/devel.yml
+++ b/.github/workflows/devel.yml
@@ -76,6 +76,13 @@ jobs:
run: make V=1
- name: Tests mkfs
run: sudo make TEST_LOG=dump test-mkfs
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: mkfs-tests-results.txt
+ path: tests/mkfs-tests-results.txt
+ if-no-files-found: ignore
test-check:
name: Test btrfs check
runs-on: ubuntu-latest
@@ -91,6 +98,13 @@ jobs:
run: sudo make TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make TEST_LOG=dump test-check-lowmem
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: fsck-tests-results.txt
+ path: tests/fsck-tests-results.txt
+ if-no-files-found: ignore
test-misc:
name: Test misc
runs-on: ubuntu-latest
@@ -104,6 +118,13 @@ jobs:
run: make V=1
- name: Tests misc
run: sudo make TEST_LOG=dump test-misc
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: misc-tests-results.txt
+ path: tests/misc-tests-results.txt
+ if-no-files-found: ignore
test-convert:
name: Test btrfs-convert
runs-on: ubuntu-latest
@@ -117,6 +138,13 @@ jobs:
run: make V=1
- name: Tests convert
run: sudo make TEST_LOG=dump test-convert
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: convert-tests-results.txt
+ path: tests/convert-tests-results.txt
+ if-no-files-found: ignore
test-other:
name: Test cli, fuzz
runs-on: ubuntu-latest
@@ -130,5 +158,19 @@ jobs:
run: make V=1
- name: Tests cli
run: sudo make TEST_LOG=dump test-cli
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: cli-tests-results.txt
+ path: tests/cli-tests-results.txt
+ if-no-files-found: ignore
- name: Tests fuzz
run: sudo make TEST_LOG=dump test-fuzz
+ - name: Save logs to artifacts
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: fuzz-tests-results.txt
+ path: tests/fuzz-tests-results.txt
+ if-no-files-found: ignore
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 652a7df7..954e1ee5 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -41,3 +41,10 @@ jobs:
run: sudo make TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make TEST_LOG=dump test-fuzz
+ - name: Save logs on failure
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: test-results
+ path: "tests/*-results.txt"
+ if-no-files-found: ignore