-
Notifications
You must be signed in to change notification settings - Fork 113
78 lines (76 loc) · 2.55 KB
/
bdd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: BDD CI
on:
workflow_call:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CI: 1
jobs:
bdd-tests:
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- uses: DeterminateSystems/nix-installer-action@v14
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Pre-populate nix-shell
run: |
export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r)
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV
nix-shell --run "echo" shell.nix
- name: Handle Rust dependencies caching
uses: Swatinem/rust-cache@v2
- name: Build binaries
run: nix-shell --run "cargo build --bins --features=io-engine-testing"
- name: Setup Test Pre-Requisites
run: |
sudo sysctl -w vm.nr_hugepages=2560
sudo debconf-communicate <<< "set man-db/auto-update false" || true
sudo dpkg-reconfigure man-db || true
ulimit -c unlimited
sudo apt-get update
sudo apt-get install linux-modules-extra-$(uname -r)
for module in nvme_tcp nbd nvme_rdma; do
sudo modprobe $module
done
# for the coredump check
sudo apt-get install gdb
- name: Setup VENV
run: nix-shell --run "./test/python/setup.sh"
- name: Run BDD Tests
run: |
echo "TEST_START_DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
nix-shell --run "./scripts/pytest-tests.sh"
- name: Pytest BDD Report
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test/python/reports/**/xunit-report.xml
summary: true
display-options: a
fail-on-empty: true
title: Test results
- run: |
if [ -d test/python/reports ]; then
mkdir -p ci-report
mv test/python/reports ci-report/python
fi
nix-shell --run "./scripts/ci-report.sh"
if: failure()
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-report-bdd
path: ./ci-report/ci-report.tar.gz
- name: Check Coredumps
run: sudo ./scripts/check-coredumps.sh --since "${TEST_START_DATE}"
- name: Cleanup
if: always()
run: nix-shell --run "./scripts/pytest-tests.sh --clean-all-exit"
# debugging
# - name: Setup tmate session
# if: ${{ failure() }}
# timeout-minutes: 240
# uses: mxschmitt/action-tmate@v3