Skip to content

Commit

Permalink
chore: let composite action's caller install kernel headers.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Feb 15, 2024
1 parent 81998ac commit 7abf76f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Therefore, running Falco tests in your Github workflow is as easy as adding this
# Default: 'false'.
test-k8saudit: 'true'
# Whether to test drivers.
# Whether to test drivers. Requires kernel headers to be installed.
# Default: 'false'.
test-drivers: 'true'
Expand All @@ -80,6 +80,7 @@ Therefore, running Falco tests in your Github workflow is as easy as adding this

> __NOTE:__ Since we don't use annotated tags, one cannot use eg: falcosecurity/testing@v0, but only either exact tag name, branch name or commit hash.
> __NOTE:__ The action implies it gets ran on ubuntu or debian like distro. It uses `apt` to install some deps.
## Keep tests updated with the latest Falco version

Expand Down
10 changes: 3 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
required: false
default: 'false'
test-drivers:
description: 'Whether to run drivers tests. Default disabled.'
description: 'Whether to run drivers tests. Requires kernel headers to be installed. Default disabled.'
required: false
default: 'false'
static:
Expand Down Expand Up @@ -67,15 +67,11 @@ runs:
${{ inputs.sudo }} falcoctl artifact install cloudtrail-rules
- name: Install dependencies for falco-driver-loader tests
if: ${{ inputs.arch == 'x86_64' && inputs.test-drivers == 'true' }}
if: ${{ inputs.test-drivers == 'true' }}
shell: bash
run: |
${{ inputs.sudo }} apt update -y
${{ inputs.sudo }} apt install -y --no-install-recommends build-essential clang make llvm gcc dkms linux-headers-$(uname -r)
- name: Install dependencies for falco-driver-loader tests
if: ${{ inputs.arch == 'aarch64' && inputs.test-drivers == 'true' }}
uses: self-actuated/get-kernel-sources@master
${{ inputs.sudo }} apt install -y --no-install-recommends build-essential clang make llvm gcc dkms
- name: Run tests
working-directory: ${{ github.action_path }}
Expand Down

0 comments on commit 7abf76f

Please sign in to comment.