Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add Github workflow to run Ganesha and Unit Tests #198

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/run-unit-and-ganesha-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Run Unit and Ganesha Tests

on:
push:
pull_request:
branches:
- '*'

jobs:
Run-Unit-Tests-and-Ganesha:
runs-on: ubuntu-24.04

env:
SAUNAFS_TEST_TIMEOUT_MULTIPLIER: 2

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install nfs-ganesha v4.3 from Ubuntu repository
run: |
sudo apt update
sudo apt install -y nfs-common nfs-ganesha nfs-ganesha-vfs

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install SaunaFS dependencies and setup environment
run: |
sudo mkdir /mnt/hd{b,c,d}
cd $GITHUB_WORKSPACE/tests
sudo ./setup_machine.sh setup /mnt/hdb /mnt/hdc /mnt/hdd

- name: Activate virtual environment and build SaunaFS
run: |
source /var/lib/saunafs_setup_machine_venv/bin/activate
cd $GITHUB_WORKSPACE/tests/ci_build
./run-build.sh test

- name: Run Unit Tests suite
run: |
chmod +x $GITHUB_WORKSPACE/tests/ci_build/run-unit-tests.sh
$GITHUB_WORKSPACE/tests/ci_build/run-unit-tests.sh

- name: Run Ganesha suite
run: |
sudo chmod o+xr /home/runner/
sudo chown saunafstest:saunafstest /mnt/saunafstest_loop_*
sudo chown saunafstest:saunafstest /mnt/hd{b,c,d}
chmod +x $GITHUB_WORKSPACE/tests/ci_build/run-ganesha-tests.sh
$GITHUB_WORKSPACE/tests/ci_build/run-ganesha-tests.sh
Loading