-
Notifications
You must be signed in to change notification settings - Fork 245
90 lines (86 loc) · 2.66 KB
/
smoke-test.yml
File metadata and controls
90 lines (86 loc) · 2.66 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: LMD Smoke Tests
on:
push:
branches: [master, '2.*']
pull_request:
branches: [master, '2.*']
jobs:
smoke-test:
uses: rfxn/batsman/.github/workflows/test.yml@v1.2.2
with:
project-name: lmd
os-matrix: '["debian12","centos6","centos7","rocky8","rocky9","rocky10","ubuntu2004","ubuntu2404"]'
timeout: 25
yara-x:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: docker/setup-buildx-action@v3
- name: Build base image (debian12 for yara-x)
uses: docker/build-push-action@v6
with:
context: tests/infra
file: tests/infra/dockerfiles/Dockerfile.debian12
tags: lmd-base-debian12
load: true
cache-from: type=gha,scope=base-debian12
cache-to: type=gha,mode=max,scope=base-debian12
- name: Build yara-x image
run: |
docker build \
--build-arg BASE_IMAGE=lmd-base-debian12 \
-f tests/Dockerfile.yara-x \
-t lmd-test-yara-x .
- name: Run yara-x tests
run: |
mkdir -p "${{ runner.temp }}/reports"
docker run --rm \
-v "${{ runner.temp }}/reports:/reports" \
lmd-test-yara-x \
bats --formatter tap \
--report-formatter junit --output /reports \
/opt/tests/
- name: Upload yara-x test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-lmd-yara-x
path: ${{ runner.temp }}/reports/
retention-days: 14
if-no-files-found: ignore
uat:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: docker/setup-buildx-action@v3
- name: Build base image
uses: docker/build-push-action@v6
with:
context: tests/infra
file: tests/infra/dockerfiles/Dockerfile.debian12
tags: lmd-base-debian12
load: true
cache-from: type=gha,scope=base-debian12
cache-to: type=gha,mode=max,scope=base-debian12
- name: Build test image
run: |
docker build \
--build-arg BASE_IMAGE=lmd-base-debian12 \
-f tests/Dockerfile \
-t lmd-test-debian12 .
- name: Run UAT scenarios
run: make -C tests uat
- name: Upload UAT results
if: always()
uses: actions/upload-artifact@v4
with:
name: uat-results
path: /tmp/uat-output/
retention-days: 14
if-no-files-found: ignore