improve hub CI to properly build with current crowdsec code
This commit is contained in:
parent
44ef58b847
commit
4acd584969
1 changed files with 22 additions and 11 deletions
33
.github/workflows/hub-ci.yml
vendored
33
.github/workflows/hub-ci.yml
vendored
|
@ -18,18 +18,29 @@ jobs:
|
||||||
id: go
|
id: go
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: Build release
|
||||||
run: make release
|
run: make release
|
||||||
- name: Create test env
|
- name: clone and build hub CI tool
|
||||||
run: cd crowdsec-pull && ls -l && ./test_env.sh && cd ./tests && ls -l
|
run: |
|
||||||
- name: Download hub tests
|
git clone https://github.com/crowdsecurity/hub-tests.git
|
||||||
working-directory: crowdsec-pull/tests/
|
cd hub-tests
|
||||||
run: pwd && git clone https://github.com/crowdsecurity/hub-tests.git
|
make
|
||||||
- name: Build/prep hub tests
|
- name: Create crowdsec test env with all parsers from the release
|
||||||
working-directory: crowdsec-pull/tests/
|
run: |
|
||||||
run: pwd && cd hub-tests && bash -x ./prep_tests.sh && cd ..
|
cd crowdsec-pull
|
||||||
- name: Run the tests
|
./test_env.sh
|
||||||
working-directory: crowdsec-pull/tests/
|
cd tests
|
||||||
|
for i in `./cscli -c dev.yaml list parsers -a -o json | jq -r ".[].name" ` ; do
|
||||||
|
./cscli -c dev.yaml install parser $i ;
|
||||||
|
done
|
||||||
|
- name: Setup hub ci in crowdsec
|
||||||
|
working-directory: ./crowdsec-pull/tests/
|
||||||
|
run: |
|
||||||
|
cd tests
|
||||||
|
cp -R ../../hub-tests/tests .
|
||||||
|
cp ../../hub-tests/main .
|
||||||
|
- name: Run the HUB CI
|
||||||
|
working-directory: ./crowdsec-pull/tests/
|
||||||
run: |
|
run: |
|
||||||
for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do
|
for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do
|
||||||
echo "::group::Test-${i}" ;
|
echo "::group::Test-${i}" ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue