From a54797ae12829a1910186e267d2bc9d5c9bda80c Mon Sep 17 00:00:00 2001 From: Crash Date: Fri, 20 Sep 2024 13:22:08 +0200 Subject: [PATCH 1/2] ci: Add Github workflow to run Ganesha suite Previously, Ganesha suite ran as part of the Jenkins pipeline. This commit adds a Github action workflow to run GaneshaTests suite. --- .github/workflows/run-ganesha-tests.yml | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/run-ganesha-tests.yml diff --git a/.github/workflows/run-ganesha-tests.yml b/.github/workflows/run-ganesha-tests.yml new file mode 100644 index 000000000..356007259 --- /dev/null +++ b/.github/workflows/run-ganesha-tests.yml @@ -0,0 +1,48 @@ +name: Run Ganesha Tests + +on: + push: + pull_request: + branches: + - '*' + +jobs: + run-ganesha-tests: + 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 + 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 GaneshaTests 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 From 23b492c68981c7d7d3d156c4046922decc60d1b4 Mon Sep 17 00:00:00 2001 From: Crash Date: Sat, 21 Sep 2024 21:09:28 +0200 Subject: [PATCH 2/2] ci: Update Github workflow to run unit tests Previously, unit tests suite ran as part of the Jenkins pipeline. This commit updates Github action workflow to run unit tests suite. --- ...sha-tests.yml => run-unit-and-ganesha-tests.yml} | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) rename .github/workflows/{run-ganesha-tests.yml => run-unit-and-ganesha-tests.yml} (77%) diff --git a/.github/workflows/run-ganesha-tests.yml b/.github/workflows/run-unit-and-ganesha-tests.yml similarity index 77% rename from .github/workflows/run-ganesha-tests.yml rename to .github/workflows/run-unit-and-ganesha-tests.yml index 356007259..36f5fcad3 100644 --- a/.github/workflows/run-ganesha-tests.yml +++ b/.github/workflows/run-unit-and-ganesha-tests.yml @@ -1,4 +1,4 @@ -name: Run Ganesha Tests +name: Run Unit and Ganesha Tests on: push: @@ -7,7 +7,7 @@ on: - '*' jobs: - run-ganesha-tests: + Run-Unit-Tests-and-Ganesha: runs-on: ubuntu-24.04 env: @@ -27,7 +27,7 @@ jobs: with: python-version: '3.x' - - name: Install SaunaFS dependencies + - name: Install SaunaFS dependencies and setup environment run: | sudo mkdir /mnt/hd{b,c,d} cd $GITHUB_WORKSPACE/tests @@ -39,7 +39,12 @@ jobs: cd $GITHUB_WORKSPACE/tests/ci_build ./run-build.sh test - - name: Run GaneshaTests suite + - 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_*