generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (46 loc) · 1.09 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
crawler_changed: ${{ steps.filter.outputs.crawler }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
crawler:
- 'kernel_crawler/**'
test:
name: test kernel-crawler
runs-on: ubuntu-latest
needs: paths-filter
if: needs.paths-filter.outputs.crawler_changed == 'true'
steps:
- name: Checkout repo ⤵️
uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt update
sudo apt install python3 python3-pip python3-pygit2 jq
- name: Install crawler
run: |
pip3 install .
- name: Run crawler
run: |
kernel-crawler crawl --distro "*" > kernels.json
- name: Validate json
run: |
cat kernels.json | jq empty
- uses: actions/upload-artifact@v3
with:
path: kernels.json