Skip to content

New transform to add features for machine learning #636

New transform to add features for machine learning

New transform to add features for machine learning #636

Workflow file for this run

name: tests go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
dev:
strategy:
matrix:
os-version: ['ubuntu-22.04', 'macos-12']
go-version: ['1.19', '1.20']
package: ['dnsutils', 'collectors', 'loggers', 'transformers', 'netlib']
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Show Go version
run: |
go version
sudo go version
- name: Set up Go for root
if: runner.os != 'macOS'
run: |
which go
sudo which go
sudo ln -sf `which go` `sudo which go` || true
- name: Show Go version
run: |
go version
sudo go version
- name: Test ${{ matrix.package }}
run: sudo go test -timeout 60s ./${{ matrix.package }}/ -race -cover -v
int:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version: ['1.19', '1.20']
package: ['config', 'clientquery_dnstaptcp', 'clientquery_dnstapunix' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go
- name: Test ${{ matrix.package }}
run: |
sudo python3 -m pip install dnstap_pb fstrm dnspython
sudo python3 -m pip install --upgrade protobuf
sudo python3 -m unittest tests.${{ matrix.package }} -v
metrics:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version: ['1.19', '1.20']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: build binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go
- name: run collector
run: ./go-dnscollector -config ./testsdata/config_prom.yml &
- name: download dnstap generator
run: |
wget -nv https://github.com/dmachard/go-dnstap-generator/releases/download/v0.4.0/go-dnstap-generator_0.4.0_linux_amd64.tar.gz
tar xf go-dnstap-generator_0.4.0_linux_amd64.tar.gz
./go-dnstap-generator -i 127.0.0.1 -p 6000 -n 1
env:
GENTAP: "0.4.0"
- name: check prometheus format metrics
run: |
wget -nv https://github.com/prometheus/prometheus/releases/download/v$PROM_VERSION/prometheus-$PROM_VERSION.linux-amd64.tar.gz
tar xf prometheus-$PROM_VERSION.linux-amd64.tar.gz
cd prometheus-$PROM_VERSION.linux-amd64/
curl -u admin:changeme http://127.0.0.1:8081/metrics | ./promtool check metrics
env:
PROM_VERSION: "2.43.0"