Skip to content

Refactor the data search and move it to it's own file, also add more tests for it #337

Refactor the data search and move it to it's own file, also add more tests for it

Refactor the data search and move it to it's own file, also add more tests for it #337

Workflow file for this run

name: Continuous Integration
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.22", "1.21"]
node: [22, 20]
exclude:
- go: 1.22
node: 20
- go: 1.21
node: 22
name: Go ${{ matrix.go }}, Node ${{ matrix.node }} build
steps:
- uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Build frontend
working-directory: ./web
run: |
yarn install --frozen-lockfile
yarn build
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- name: Install dependencies
run: sudo apt-get install -y libpcap-dev
- name: Build
run: go build -v ./cmd/pkappa2/main.go
- name: Test with the Go CLI
run: go test -v ./...
golangci:
name: Lint Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install dependencies
run: sudo apt-get install -y libpcap-dev
- name: Fake frontend build
run: |
mkdir -p web/dist
touch web/dist/index.html
- name: Lint
uses: golangci/golangci-lint-action@v6
yarnlint:
name: Lint Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install frontend dependencies
working-directory: ./web
run: yarn install --frozen-lockfile
- name: Lint frontend
working-directory: ./web
run: |
yarn lint
yarn prettier --check .