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

chore: let composite action's caller install kernel headers. #44

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
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
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
Loading