Skip to content

added bats test for ldcache #33

added bats test for ldcache

added bats test for ldcache #33

Workflow file for this run

name: VS integration test
on:
push: {}
jobs:
build:
runs-on: zinal
steps:
- name: Setup temporary dir
run: |
TMP_DIR=$(mktemp -d)
echo "TMP_DIR=$TMP_DIR" >> $GITHUB_ENV
echo "Using temp directory: $TMP_DIR"
- name: Manually clone repo within tmp dir
run: git clone --depth 1 --branch "${GITHUB_REF_NAME}" https://github.com/${GITHUB_REPOSITORY}.git
working-directory: ${{ env.TMP_DIR }}
- name: List contents of TMP_DIR
run: ls -la
working-directory: ${{ env.TMP_DIR }}
- name: Install Bats locally into TMP_DIR
run: |
git clone --depth 1 https://github.com/bats-core/bats-core.git "$TMP_DIR/bats-core"
"$TMP_DIR/bats-core/install.sh" "$TMP_DIR/bats"
working-directory: ${{ env.TMP_DIR }}
- name: Build and local install the hooks
run: |
# TODO: current dummy taking static bins
# TODO: build and local install from devcontainer
HOOKS_DIR="/scratch/local/podman-hooks/hooks.d"
echo "HOOKS_DIR=$HOOKS_DIR" >> $GITHUB_ENV
echo "Using Hooks directory: $HOOKS_DIR"
- name: Simple podman run with default hooks
run: |
podman --hooks-dir $HOOKS_DIR run --rm alpine cat /mnt/os-release
- name: Run Bats tests
run: |
cd sarus-hooks
$TMP_DIR/bats/bin/bats tests
working-directory: ${{ env.TMP_DIR}}