From a75017b8e038ff2a35279c620f2dd1ad6ad0a1e0 Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Sat, 28 Aug 2021 09:45:43 +0200 Subject: [PATCH] Adjust GitHub Actions for Pull Requests --- .github/workflows/shellcheck.yml | 9 ++++++--- .github/workflows/tests.yml | 25 ++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 61d8649..7e46208 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,19 +1,22 @@ name: shellcheck -on: push +on: [push, pull_request] jobs: - build: + shellcheck: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: recursive + - name: Shellcheck pimod.sh run: shellcheck -x pimod.sh + - name: Shellcheck modules/*.sh run: cd modules && shellcheck -x *.sh + - name: Shellcheck stages/*.sh run: cd stages && shellcheck -x *.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5ef893..5db3452 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,14 +1,33 @@ name: tests -on: push + +on: [push, pull_request] jobs: - build: + test-local: runs-on: ubuntu-latest + steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: recursive + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y binfmt-support file kpartx parted qemu qemu-user-static unzip p7zip-full wget xz-utils + shell: bash + + - name: Run pimod OpenWRT example + run: sudo ./pimod.sh examples/RPi-OpenWRT.Pifile + + test-action: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Run pimod OpenWRT example uses: Nature40/pimod@HEAD with: