@@ -301,6 +301,96 @@ jobs:
301301 path : |
302302 codecov.json
303303
304+ nydus-integration-test-coverage :
305+ if : github.event_name == 'pull_request'
306+ needs : [contrib-build]
307+ runs-on : ubuntu-latest
308+ env :
309+ CARGO_TERM_COLOR : always
310+ steps :
311+ - name : Checkout
312+ uses : actions/checkout@v6
313+ - name : Rust Cache
314+ uses : Swatinem/rust-cache@v2
315+ with :
316+ cache-on-failure : true
317+ shared-key : Linux-cargo-amd64-coverage
318+ save-if : ${{ github.ref == 'refs/heads/master' }}
319+ - name : Install cargo-llvm-cov
320+ uses : taiki-e/install-action@cargo-llvm-cov
321+ - name : Setup Golang
322+ uses : actions/setup-go@v5
323+ with :
324+ go-version-file : ' go.work'
325+ cache-dependency-path : " **/*.sum"
326+ - name : Download Nydusify
327+ uses : actions/download-artifact@v7
328+ with :
329+ name : nydusify-artifact
330+ path : contrib/nydusify/cmd
331+ - name : Fscache Setup
332+ run : sudo bash misc/fscache/setup.sh
333+ - name : Prepare Older Binaries
334+ run : |
335+ export NYDUS_STABLE_VERSION=$(curl https://api.github.com/repos/Dragonflyoss/nydus/releases/latest | jq -r '.tag_name')
336+
337+ versions=(v0.1.0 ${NYDUS_STABLE_VERSION})
338+ version_archs=(v0.1.0-x86_64 ${NYDUS_STABLE_VERSION}-linux-amd64)
339+ for i in ${!versions[@]}; do
340+ version=${versions[$i]}
341+ version_arch=${version_archs[$i]}
342+
343+ wget -q https://github.com/dragonflyoss/nydus/releases/download/$version/nydus-static-$version_arch.tgz
344+ sudo mkdir -p nydus-$version /usr/bin/nydus-$version
345+ sudo tar xzf nydus-static-$version_arch.tgz -C nydus-$version
346+ sudo cp -r nydus-$version/nydus-static/* /usr/bin/nydus-$version/
347+ done
348+ - name : Free Disk Space
349+ uses : jlumbroso/free-disk-space@main
350+ with :
351+ tool-cache : false
352+ android : true
353+ dotnet : true
354+ haskell : true
355+ large-packages : true
356+ docker-images : true
357+ swap-storage : true
358+ - name : Generate integration coverage
359+ shell : bash
360+ run : |
361+ source <(cargo llvm-cov show-env --sh)
362+ cargo llvm-cov clean --workspace
363+ cargo build --release --features=virtiofs --bins
364+
365+ sudo mkdir -p /usr/bin/nydus-latest /home/runner/work/workdir
366+ sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/bin/nydus-latest
367+ sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/bin/nydus-latest
368+ sudo bash misc/prepare.sh
369+
370+ export NYDUS_STABLE_VERSION=$(curl https://api.github.com/repos/Dragonflyoss/nydus/releases/latest | jq -r '.tag_name')
371+ export NYDUS_STABLE_VERSION_EXPORT="${NYDUS_STABLE_VERSION//./_}"
372+
373+ versions=(v0.1.0 ${NYDUS_STABLE_VERSION} latest)
374+ version_exports=(v0_1_0 ${NYDUS_STABLE_VERSION_EXPORT} latest)
375+ for i in ${!version_exports[@]}; do
376+ version=${versions[$i]}
377+ version_export=${version_exports[$i]}
378+ export NYDUS_BUILDER_$version_export=/usr/bin/nydus-$version/nydus-image
379+ export NYDUS_NYDUSD_$version_export=/usr/bin/nydus-$version/nydusd
380+ export NYDUS_NYDUSIFY_$version_export=/usr/bin/nydus-$version/nydusify
381+ done
382+
383+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v2.1.6
384+ sudo -E make smoke-only
385+
386+ cargo llvm-cov report --release --codecov --output-path smoke-codecov.json
387+ - name : Upload integration coverage file
388+ uses : actions/upload-artifact@v6
389+ with :
390+ name : nydus-integration-test-coverage-artifact
391+ path : |
392+ smoke-codecov.json
393+
304394 upload-coverage-to-codecov :
305395 runs-on : ubuntu-latest
306396 needs : [contrib-unit-test-coverage, nydus-unit-test-coverage]
@@ -323,6 +413,25 @@ jobs:
323413 verbose : true
324414 fail_ci_if_error : true
325415
416+ upload-integration-coverage-to-codecov :
417+ if : github.event_name == 'pull_request'
418+ runs-on : ubuntu-latest
419+ needs : [nydus-integration-test-coverage]
420+ steps :
421+ - uses : actions/checkout@v6
422+ - name : Download nydus integration coverage file
423+ uses : actions/download-artifact@v7
424+ with :
425+ name : nydus-integration-test-coverage-artifact
426+ - name : Upload integration coverage to Codecov
427+ uses : codecov/codecov-action@v5
428+ env :
429+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
430+ with :
431+ files : ./smoke-codecov.json
432+ verbose : true
433+ fail_ci_if_error : true
434+
326435 nydus-cargo-deny :
327436 name : cargo-deny
328437 runs-on : ubuntu-latest
0 commit comments