From be892582a2ddff20f23583f9e52bd39605274b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?= Date: Sun, 7 Apr 2024 12:01:08 +0100 Subject: [PATCH] Github Action: Add new Manual Test workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gonçalo Negrier Duarte --- .github/workflows/extra.yaml | 23 +----- .github/workflows/manual_test.yaml | 112 +++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/manual_test.yaml diff --git a/.github/workflows/extra.yaml b/.github/workflows/extra.yaml index 7125cd1..0c0c982 100644 --- a/.github/workflows/extra.yaml +++ b/.github/workflows/extra.yaml @@ -1,15 +1,7 @@ name: Manual actions on: - workflow_dispatch: - inputs: - BUILD_KERNEL_PATCH: - description: 'Test build kernel patch' - required: true - default: 'true' - type: choice - options: - - true - - false + workflow_dispatch + jobs: build: runs-on: ubuntu-latest @@ -36,14 +28,3 @@ jobs: limit-access-to-actor: true ## limits ssh access and adds the ssh public keys of the listed GitHub users limit-access-to-users: johnfanv2 - # Use to test kernel patch build if needed - release-kernel-patch: - runs-on: ubuntu-latest - if: ${{ github.event.inputs.BUILD_KERNEL_PATCH == 'true' }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Build kernel patch - run: ./deploy/build_kernelpatch.sh - shell: bash diff --git a/.github/workflows/manual_test.yaml b/.github/workflows/manual_test.yaml new file mode 100644 index 0000000..f18c827 --- /dev/null +++ b/.github/workflows/manual_test.yaml @@ -0,0 +1,112 @@ +name: Manual Build Test +run-name: ${{ github.actor }} running Build PR +on: + workflow_dispatch: + inputs: + BUILD_KERNEL_PATCH: + description: 'Test build kernel patch' + required: true + default: 'true' + type: choice + options: + - true + - false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Dependencies + run: ./deploy/dependencies/install_dependencies_ubuntu.sh + shell: bash + - name: Build + run: ./tests/test_kernel_build.sh + shell: bash + - name: Install + run: ./tests/test_kernel_install.sh + shell: bash + + run-kernel-module-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Dependencies + run: ./deploy/dependencies/install_dependencies_ubuntu.sh + shell: bash + - name: Test Install + run: ./tests/test_kernel_install.sh + shell: bash + - name: Test Reload First + run: ./tests/test_kernel_reload.sh + shell: bash + - name: Test Reload Second + run: ./tests/test_kernel_reload.sh + shell: bash + + run-kernel-dkms-install-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Dependencies + run: ./deploy/dependencies/install_dependencies_ubuntu.sh + shell: bash + - name: Build + run: ./tests/test_kenel_dkms_install.sh || true + shell: bash + + run-tests: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + - name: Install Development Dependencies + run: ./deploy/dependencies/install_development_dependencies_ubuntu.sh + shell: bash + - name: Lint with Linux checkpath + if: always() + run: ./tests/test_kernel_checkpath.sh + shell: bash + - name: Lint with pylint + if: always() + run: ./tests/test_python.sh + shell: bash + - name: Test python CLI + if: always() + run: ./tests/test_python_cli.sh + shell: bash + #- name: Test python GUI + #if: always() + #run: ./tests/test_python_gui.sh + #shell: bash + - name: Install python package + if: always() + run: ./deploy/python_install_pip_pkg.sh + shell: bash + + # Use to test kernel patch build if needed + release-kernel-patch: + needs: [build, run-kernel-module-test, run-kernel-dkms-install-test, run-tests] + runs-on: ubuntu-latest + if: ${{ github.event.inputs.BUILD_KERNEL_PATCH == 'true' }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Build kernel patch + run: ./deploy/build_kernelpatch.sh + shell: bash + + test-in-docker-container: + needs: [build, run-tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build containers and run tests inside them + run: ./deploy/build_containers.sh + shell: bash