Skip to content

Commit

Permalink
chore(ci): ported to make use of composite action.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Feb 15, 2024
1 parent 866cbb1 commit 12e1ea9
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,15 @@ jobs:
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
uses: actions/checkout@v4
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
env:
# fixme(leogr): this is a workaround for https://github.com/falcosecurity/falco/issues/2784
HOST_ROOT: ""
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
uses: ./
with:
paths: "report.xml"
show: "all"
if: always() # note: upload the report even if tests fail
test-falco: 'true'
test-falcoctl: 'true'
test-k8saudit: 'true'
show-all: 'true'

0 comments on commit 12e1ea9

Please sign in to comment.