mirror of
https://github.com/crowdsecurity/cs-firewall-bouncer.git
synced 2024-08-19 01:18:49 +03:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Test .deb packaging
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: "Test .deb packages"
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.22.5
|
|
|
|
- name: Cache virtualenvs
|
|
id: cache-pipenv
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.local/share/virtualenvs
|
|
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
|
|
|
|
- name: Install functional test dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y build-essential debhelper devscripts fakeroot lintian
|
|
docker network create net-test
|
|
python3 -m pip install --upgrade pipenv wheel
|
|
pipenv install --deploy
|
|
sudo python3 -m pip install --upgrade pipenv wheel
|
|
sudo pipenv install --deploy
|
|
|
|
- name: Run functional tests
|
|
env:
|
|
CROWDSEC_TEST_VERSION: dev
|
|
CROWDSEC_TEST_FLAVORS: full
|
|
CROWDSEC_TEST_NETWORK: net-test
|
|
CROWDSEC_TEST_TIMEOUT: 60
|
|
PYTEST_ADDOPTS: --durations=0 -vv --color=yes
|
|
run: |
|
|
sudo apt install -y nftables iptables ipset
|
|
pipenv run pytest test/pkg/test_build_deb.py
|
|
sudo -E pipenv run pytest -m deb ./test/install/no_crowdsec
|