crowdsec/.github/workflows/ci_hub-tests.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

name: Hub-CI
2020-06-10 10:14:27 +00:00
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
2020-06-10 10:14:27 +00:00
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
2020-06-10 10:14:27 +00:00
jobs:
build:
name: Hub Parser/Scenario tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
2020-06-10 10:14:27 +00:00
uses: actions/setup-go@v1
with:
go-version: 1.16
2020-06-10 10:14:27 +00:00
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
2020-06-10 10:14:27 +00:00
- name: Build release
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
with:
2020-12-14 10:53:30 +00:00
owner: crowdsecurity
repo: crowdsec
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