Skip to content

ci: switch from jenkins to github actions #12

ci: switch from jenkins to github actions

ci: switch from jenkins to github actions #12

Workflow file for this run

name: BDD CI
on:
workflow_call:
push:
branches:
- ci
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"
- name: Setup Test Pre-Requisites
run: |
sudo sysctl -w vm.nr_hugepages=3072
sudo apt-get install linux-modules-extra-$(uname -r)
sudo modprobe nvme_tcp
echo "never" | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
- name: Run BDD Tests
run: |
nix-shell --run "deployer start --image-pull-policy always -w 60s && deployer stop"
while [ $? -eq 0 ]; do
nix-shell --run "./scripts/python/test.sh -x"
done
# nix-shell --run "./scripts/python/test.sh"
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failed-docker-logs
path: docker-logs.txt
- name: Cleanup
if: always()
run: |
nix-shell --run "./scripts/python/test-residue-cleanup.sh"
cat /proc/meminfo | grep -i huge
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: report.xml
summary: true
display-options: a
fail-on-empty: true
title: Test results
# debugging
- name: Setup tmate session
if: ${{ failure() }}
timeout-minutes: 240
uses: mxschmitt/action-tmate@v3