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
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
- name: Build release
|
||||
run: make release
|
||||
- name: Create test env
|
||||
run: cd crowdsec-pull && ls -l && ./test_env.sh && cd ./tests && ls -l
|
||||
- name: Download hub tests
|
||||
working-directory: crowdsec-pull/tests/
|
||||
run: pwd && git clone https://github.com/crowdsecurity/hub-tests.git
|
||||
- name: Build/prep hub tests
|
||||
working-directory: crowdsec-pull/tests/
|
||||
run: pwd && cd hub-tests && bash -x ./prep_tests.sh && cd ..
|
||||
- name: Run the tests
|
||||
working-directory: crowdsec-pull/tests/
|
||||
- name: clone and build hub CI tool
|
||||
run: |
|
||||
git clone https://github.com/crowdsecurity/hub-tests.git
|
||||
cd hub-tests
|
||||
make
|
||||
- name: Create crowdsec test env with all parsers from the release
|
||||
run: |
|
||||
cd crowdsec-pull
|
||||
./test_env.sh
|
||||
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: |
|
||||
for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do
|
||||
echo "::group::Test-${i}" ;
|
||||
|
|
Loading…
Add table
Reference in a new issue