Skip to content

feat: send logs to userspace + revamp #69

feat: send logs to userspace + revamp

feat: send logs to userspace + revamp #69

Workflow file for this run

name: quality
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
workflow_dispatch:
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
fmt-go:
name: fmt/go
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.21.9"
- name: Run make fmt/go
run: make fmt/go
- name: Check for unstaged files
run: ./ci/scripts/check_unstaged.sh
fmt-prettier:
name: fmt/prettier
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
- name: Install prettier
run: npm install --global prettier
- name: Run make fmt/prettier
run: make fmt/prettier
- name: Check for unstaged files
run: ./ci/scripts/check_unstaged.sh
lint-go:
name: lint/go
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.21.9"
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.57.2
# Linting needs to be done on each build variation of GOOS.
- name: Run make lint/go/linux
run: make lint/go/linux
# The windows and darwin builds include the same files.
- name: Run make lint/go/other
run: make lint/go/other
test-go:
name: "test/go"
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.21.9"
- name: Echo Go Cache Paths
id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.**', '**.go') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Test
run: make test/go
lint-c:
name: lint/c
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run make lint/c
run: make lint/c
- name: Ensure DEBUG is disabled
run: |
# look for uncommented "#define DEBUG" in bpf/handler.c
if grep -q "^#define DEBUG" bpf/handler.c; then
echo "DEBUG is enabled in bpf/handler.c"
exit 1
fi
lint-shellcheck:
name: lint/shellcheck
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install shellcheck
run: sudo apt install -y shellcheck
- name: Run make lint/shellcheck
run: make lint/shellcheck