Skip to content

update(tests/falco): cover new skip-if-unknown-filter semantics #84

update(tests/falco): cover new skip-if-unknown-filter semantics

update(tests/falco): cover new skip-if-unknown-filter semantics #84

Workflow file for this run

#
# Copyright (C) 2023 The Falco Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Test on Latest Dev Falco
on:
workflow_dispatch:
inputs:
version:
description: Falco Version
default: master
required: true
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build:
name: Run Tests on falcosecurity/falco image
runs-on: ubuntu-latest
container:
image: falcosecurity/falco:${{ github.event.inputs.version || 'master' }}
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '>=1.17.0'
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
# note: this converts the output of go test into a junit-compatible,
# which can later be processed by test-summary/action to upload
# a Markdown report on the GitHub Actions workflow.
- name: Install go-junit-report
run: |
go install github.com/jstemmer/go-junit-report/v2@latest
- name: Generate test files
run: |
go generate ./...
- name: Run tests
run: |
./build/falco.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true
./build/falcoctl.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true
./build/k8saudit.test -test.timeout=90s -test.v >> ./report.txt 2>&1 || true
cat ./report.txt | go-junit-report -set-exit-code > report.xml
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "report.xml"
show: "all"
if: always() # note: upload the report even if tests fail