2020-11-30 09:37:17 +00:00
|
|
|
name: Hub-CI
|
2020-06-10 10:14:27 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Hub Parser/Scenario tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.13
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
2020-09-01 12:32:45 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-06-10 10:14:27 +00:00
|
|
|
- name: Build release
|
2020-09-01 12:32:45 +00:00
|
|
|
run: make release
|
2020-06-10 10:14:27 +00:00
|
|
|
- name: clone and build hub CI tool
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/crowdsecurity/hub-tests.git
|
|
|
|
cd hub-tests
|
|
|
|
make
|
2020-12-14 10:53:30 +00:00
|
|
|
- id: keydb
|
|
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
2020-09-01 12:32:45 +00:00
|
|
|
with:
|
2020-12-14 10:53:30 +00:00
|
|
|
owner: crowdsecurity
|
|
|
|
repo: crowdsec
|
2021-01-15 08:48:39 +00:00
|
|
|
excludes: draft
|
2020-06-10 10:14:27 +00:00
|
|
|
- name: Create crowdsec test env with all parsers from the release
|
|
|
|
run: |
|
2020-12-14 10:53:30 +00:00
|
|
|
cd crowdsec-${{ steps.keydb.outputs.release }}
|
2020-06-10 10:14:27 +00:00
|
|
|
./test_env.sh
|
|
|
|
cd tests
|
2020-12-08 09:51:01 +00:00
|
|
|
for i in `./cscli -c dev.yaml parsers list -a -o json | jq -r ".[].name" ` ; do
|
|
|
|
./cscli -c dev.yaml parsers install $i ;
|
2020-06-10 10:14:27 +00:00
|
|
|
done
|