|
| 1 | +name: LMD Smoke Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master, '2.*'] |
| 6 | + pull_request: |
| 7 | + branches: [master, '2.*'] |
| 8 | + |
| 9 | +jobs: |
| 10 | + smoke-test: |
| 11 | + uses: rfxn/batsman/.github/workflows/test.yml@v1.4.2 |
| 12 | + with: |
| 13 | + project-name: lmd |
| 14 | + os-matrix: '["debian12","centos6","centos7","rocky8","rocky9","rocky10","ubuntu2004","ubuntu2404"]' |
| 15 | + timeout: 25 |
| 16 | + file-groups: 3 |
| 17 | + reports: true |
| 18 | + docker-run-flags: '-e BATS_TEST_TIMEOUT=180' |
| 19 | + |
| 20 | + yara-x: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + timeout-minutes: 25 |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + submodules: recursive |
| 27 | + - uses: docker/setup-buildx-action@v3 |
| 28 | + - name: Build base image (debian12 for yara-x) |
| 29 | + uses: docker/build-push-action@v6 |
| 30 | + with: |
| 31 | + context: tests/infra |
| 32 | + file: tests/infra/dockerfiles/Dockerfile.debian12 |
| 33 | + tags: lmd-base-debian12 |
| 34 | + load: true |
| 35 | + cache-from: type=gha,scope=base-debian12 |
| 36 | + cache-to: type=gha,mode=max,scope=base-debian12 |
| 37 | + - name: Build yara-x image |
| 38 | + run: | |
| 39 | + docker build \ |
| 40 | + --build-arg BASE_IMAGE=lmd-base-debian12 \ |
| 41 | + -f tests/Dockerfile.yara-x \ |
| 42 | + -t lmd-test-yara-x . |
| 43 | + - name: Run yara-x tests |
| 44 | + run: | |
| 45 | + mkdir -p "${{ runner.temp }}/reports" |
| 46 | + docker run --rm \ |
| 47 | + -e BATS_TEST_TIMEOUT=180 \ |
| 48 | + -v "${{ runner.temp }}/reports:/reports" \ |
| 49 | + lmd-test-yara-x \ |
| 50 | + bats --formatter tap \ |
| 51 | + --report-formatter junit --output /reports \ |
| 52 | + /opt/tests/ |
| 53 | + - name: Upload yara-x test reports |
| 54 | + if: always() |
| 55 | + uses: actions/upload-artifact@v4 |
| 56 | + with: |
| 57 | + name: test-reports-lmd-yara-x |
| 58 | + path: ${{ runner.temp }}/reports/ |
| 59 | + retention-days: 14 |
| 60 | + if-no-files-found: ignore |
| 61 | + |
| 62 | + uat: |
| 63 | + runs-on: ubuntu-latest |
| 64 | + timeout-minutes: 15 |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + with: |
| 68 | + submodules: recursive |
| 69 | + - uses: docker/setup-buildx-action@v3 |
| 70 | + - name: Build base image |
| 71 | + uses: docker/build-push-action@v6 |
| 72 | + with: |
| 73 | + context: tests/infra |
| 74 | + file: tests/infra/dockerfiles/Dockerfile.debian12 |
| 75 | + tags: lmd-base-debian12 |
| 76 | + load: true |
| 77 | + cache-from: type=gha,scope=base-debian12 |
| 78 | + cache-to: type=gha,mode=max,scope=base-debian12 |
| 79 | + - name: Build test image |
| 80 | + run: | |
| 81 | + docker build \ |
| 82 | + --build-arg BASE_IMAGE=lmd-base-debian12 \ |
| 83 | + -f tests/Dockerfile \ |
| 84 | + -t lmd-test-debian12 . |
| 85 | + - name: Run UAT scenarios |
| 86 | + run: make -C tests uat |
| 87 | + - name: Upload UAT results |
| 88 | + if: always() |
| 89 | + uses: actions/upload-artifact@v4 |
| 90 | + with: |
| 91 | + name: uat-results |
| 92 | + path: /tmp/uat-output/ |
| 93 | + retention-days: 14 |
| 94 | + if-no-files-found: ignore |
0 commit comments