2021-03-18 12:59:41 +00:00
|
|
|
name: Functional tests
|
2020-11-30 09:37:17 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-05-28 11:37:11 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'mkdocs.yml'
|
|
|
|
- 'README.md'
|
2020-11-30 09:37:17 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-05-28 11:37:11 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'mkdocs.yml'
|
|
|
|
- 'README.md'
|
2020-11-30 09:37:17 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-03-19 15:28:55 +00:00
|
|
|
name: Install generated release and perform functional tests
|
2020-11-30 09:37:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-08-25 09:43:29 +00:00
|
|
|
- name: Set up Go 1.16
|
2020-11-30 09:37:17 +00:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2021-08-25 09:43:29 +00:00
|
|
|
go-version: 1.16
|
2020-11-30 09:37:17 +00:00
|
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
2021-03-11 10:18:09 +00:00
|
|
|
- id: keydb
|
|
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
|
|
with:
|
|
|
|
owner: crowdsecurity
|
|
|
|
repo: crowdsec
|
|
|
|
excludes: draft
|
2020-11-30 09:37:17 +00:00
|
|
|
- name: Build release
|
2021-03-11 10:18:09 +00:00
|
|
|
run: BUILD_VERSION=${{ steps.keydb.outputs.release }} make release
|
2021-04-20 09:07:13 +00:00
|
|
|
- name: "Force machineid"
|
|
|
|
run: |
|
|
|
|
sudo chmod +w /etc/machine-id
|
|
|
|
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
2020-11-30 09:37:17 +00:00
|
|
|
- name: Install release
|
|
|
|
run: |
|
2021-03-11 10:18:09 +00:00
|
|
|
cd crowdsec-${{ steps.keydb.outputs.release }}
|
2021-03-18 12:59:41 +00:00
|
|
|
sudo ./wizard.sh --unattended
|
|
|
|
- name: "Test post-install base"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_0base.sh
|
|
|
|
- name: "Test post-install bouncer"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_1bouncers.sh
|
|
|
|
- name: "Test post-install bouncer"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_2collections.sh
|
|
|
|
- name: "Test post-install bouncer"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_3machines.sh
|
|
|
|
- name: "Test post-install ip management"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_99ip_mgmt.sh
|
|
|
|
- name: "Test cold logs"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_4cold-logs.sh
|
2021-05-17 09:54:28 +00:00
|
|
|
- name: "Test simulation"
|
|
|
|
run: |
|
|
|
|
cd scripts/func_tests/
|
|
|
|
./tests_post-install_5simulation.sh
|
2021-09-08 13:22:34 +00:00
|
|
|
- name: "Test post-install plugins"
|
|
|
|
run: |
|
|
|
|
cd scripts/func_tests/
|
|
|
|
sudo ./tests_post-install_7_plugin.sh
|
2021-03-18 12:59:41 +00:00
|
|
|
- name: "Uninstall"
|
|
|
|
run: sudo ./wizard.sh --uninstall
|
|
|
|
- name: "Test post remove"
|
2020-11-30 09:37:17 +00:00
|
|
|
run: |
|
2021-03-18 12:59:41 +00:00
|
|
|
cd scripts/func_tests/
|
|
|
|
bash -x ./tests_post-remove_0base.sh
|