-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
543 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.3 | ||
|
||
- name: Cache virtualenvs | ||
id: cache-pipenv | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | ||
|
||
- name: Install functional test dependencies | ||
run: | | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
[packages] | ||
pytest-dotenv = "*" | ||
flask = "*" | ||
pytimeparse = "*" | ||
psutil = "*" | ||
pytest-cs = {ref = "0.6.0", git = "https://github.com/crowdsecurity/pytest-cs.git"} | ||
pytest-cs = {ref = "0.7.13", git = "https://github.com/crowdsecurity/pytest-cs.git"} | ||
pytest-dotenv = "0.5.2" | ||
pytest-dependency = "0.5.1" | ||
pexpect = "4.8.0" | ||
flask = "2.2.3" | ||
pytimeparse = "1.1.8" | ||
psutil = "5.9.5" | ||
|
||
[dev-packages] | ||
gnureadline = "*" | ||
ipdb = "*" | ||
gnureadline = "8.1.2" | ||
ipdb = "0.13.13" | ||
|
||
[requires] | ||
python_version = "3.10" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.