|
| 1 | +name: Integration CI |
| 2 | +on: |
| 3 | + workflow_call: |
| 4 | + |
| 5 | +env: |
| 6 | + CARGO_TERM_COLOR: always |
| 7 | + CARGO_INCREMENTAL: 0 |
| 8 | + |
| 9 | +jobs: |
| 10 | + int-tests: |
| 11 | + runs-on: ubuntu-latest-16-cores |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + with: |
| 15 | + fetch-depth: 0 |
| 16 | + submodules: 'recursive' |
| 17 | + - uses: DeterminateSystems/nix-installer-action@v14 |
| 18 | + - uses: DeterminateSystems/magic-nix-cache-action@v8 |
| 19 | + - name: Pre-populate nix-shell |
| 20 | + run: | |
| 21 | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) |
| 22 | + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV |
| 23 | + nix-shell --run "echo" shell.nix |
| 24 | + - name: Handle Rust dependencies caching |
| 25 | + uses: Swatinem/rust-cache@v2 |
| 26 | + with: |
| 27 | + save-if: ${{ startsWith(github.ref_name, 'release/') || github.ref_name == 'develop' }} |
| 28 | + - name: Build binaries |
| 29 | + run: nix-shell --run "cargo build --bins --features=io-engine-testing" |
| 30 | + - name: Setup Test Pre-Requisites |
| 31 | + run: | |
| 32 | + sudo sysctl -w vm.nr_hugepages=3584 |
| 33 | + sudo apt-get install linux-modules-extra-$(uname -r) |
| 34 | + for module in nvme_tcp nbd nvme_rdma; do |
| 35 | + sudo modprobe $module |
| 36 | + done |
| 37 | + sudo apt-get install gdb |
| 38 | + - name: Run Rust Tests |
| 39 | + run: | |
| 40 | + echo "TEST_START_DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV |
| 41 | + nix-shell --run "./scripts/cargo-test.sh" |
| 42 | + - name: Cleanup |
| 43 | + if: always() |
| 44 | + run: nix-shell --run "./scripts/clean-cargo-tests.sh" |
| 45 | + - name: Check Coredumps |
| 46 | + run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}" |
| 47 | + - name: Run JS Grpc Tests |
| 48 | + run: | |
| 49 | + echo "TEST_START_DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV |
| 50 | + nix-shell --run "./scripts/grpc-test.sh" |
| 51 | + mkdir js-reports |
| 52 | + for file in *-xunit-report.xml; do |
| 53 | + echo "<testsuites>" > "js-reports/$file" |
| 54 | + cat $file >> "js-reports/$file" |
| 55 | + echo "</testsuites>" >> "js-reports/$file" |
| 56 | + done |
| 57 | + - name: Test Report |
| 58 | + if: always() |
| 59 | + uses: pmeier/pytest-results-action@main |
| 60 | + with: |
| 61 | + path: 'js-reports/*-xunit-report.xml' |
| 62 | + summary: true |
| 63 | + display-options: a |
| 64 | + fail-on-empty: true |
| 65 | + title: Test results |
| 66 | + - name: Cleanup |
| 67 | + if: always() |
| 68 | + run: nix-shell --run "./scripts/clean-cargo-tests.sh" |
| 69 | + - name: Check Coredumps |
| 70 | + run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}" |
| 71 | +# debugging |
| 72 | + # - name: Setup tmate session |
| 73 | + # if: ${{ failure() }} |
| 74 | + # timeout-minutes: 240 |
| 75 | + # uses: mxschmitt/action-tmate@v3 |
0 commit comments