Fix BATS test environment setup in GitHub Actions

This commit is contained in:
Deploy Bot
2025-07-17 20:43:10 -04:00
parent 8ee95e15eb
commit 7d9a4af3cb

View File

@@ -30,7 +30,25 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y bats sudo apt-get install -y bats git
# Clone bats-core if not already present
if [ ! -d "bats-core" ]; then
git clone https://github.com/bats-core/bats-core.git
sudo ./bats-core/install.sh /usr/local
fi
# Install bats-support and bats-assert
mkdir -p tests/test_helper
if [ ! -d "tests/test_helper/bats-support" ]; then
git clone https://github.com/bats-core/bats-support.git tests/test_helper/bats-support --depth 1
fi
if [ ! -d "tests/test_helper/bats-assert" ]; then
git clone https://github.com/bats-core/bats-assert.git tests/test_helper/bats-assert --depth 1
fi
if [ ! -d "tests/test_helper/bats-file" ]; then
git clone https://github.com/bats-core/bats-file.git tests/test_helper/bats-file --depth 1
fi
- name: Set up SSH - name: Set up SSH
run: | run: |