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
|
name: functional
on:
workflow_call:
# smoke test definition.
# It depends on build.yml that is controlled via control.yml
#
jobs:
# Tests that gvm-libs, openvas-smb and openvas dependencies work together and
# that openvas is buildable and integrates openvas-smb when available
distributed-monolith-railguard:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
system:
- debian_stable
- debian_bookworm
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/copy-docker-binaries
with:
arch: amd64
- run: docker build -t test -f .docker/railguards/${{matrix.system}}.Dockerfile .
- run: docker run --rm test ldd /usr/local/sbin/openvas
- run: docker run --rm test ldd /usr/local/sbin/openvas | grep libopenvas_wmiclient
- run: docker run --rm test /usr/local/bin/openvasd -h
- run: docker run --rm test /usr/local/bin/scannerctl -h
- run: docker rmi test || true
tests:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: registry.community.greenbone.net/community/gvm-libs:stable
options: --privileged
steps:
# why?
- uses: actions/checkout@v6
- name: install dependencies
run: |
sh .github/install-openvas-dependencies.sh
- name: install openvas
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build -- install
- uses: actions/download-artifact@v6
with:
pattern: rs-binaries-*
merge-multiple: true
path: ./assets
- name: prepare setup
run: |
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
docker.io docker-cli
FEED_DIR="feed/" sh .github/prepare-feed.sh
install -m 755 assets/linux/amd64/feed-verifier /usr/local/bin/
install -m 755 assets/linux/amd64/scannerctl /usr/local/bin/
echo "db_address = tcp://redis:6379" >> /etc/openvas/openvas.conf
# TODO export as env variable
mv ./feed/* "$(openvas -s | grep plugins_folder | sed 's/plugins_folder = //')/"
- run: openvas -s
- name: verify feed syntax
run: scannerctl syntax --quiet "$(openvas -s | grep plugins_folder | sed 's/plugins_folder = //')/"
- name: verify feed update
run: feed-verifier || (cat /var/log/gvm/openvas.log && false)
- name: verify nasl tests
run: |
mkdir -p /etc/openvas
cd nasl/tests
make check
- uses: actions/setup-go@v6
with:
go-version: '>=1.16.0'
- name: verify lint
run: |
make build
./run -e openvas-nasl-lint
working-directory: smoketest_lint
|