Skip to content

Commit

Permalink
ci: move to root
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Dec 24, 2024
1 parent 72ddc00 commit ab9567e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build without cgo
run: make
env:
CGO_ENABLED: 0
- name: Install cgo dependencies (Linux)
run: sudo apt-get -qy install libpcap-dev
if: ${{ runner.os == 'Linux' }}
- name: Build with cgo
run: make
env:
CGO_ENABLED: 1
38 changes: 38 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CodeQL

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '40 21 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
4 changes: 4 additions & 0 deletions fw/.github/workflows/test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ jobs:
go-version: [1.23.x]
os: [ubuntu-latest]
fail-fast: false

steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout repository
uses: actions/checkout@v4

- name: Go imports check
uses: zjkmxy/[email protected]
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}

- name: Test
run: go test ./...
env:
Expand Down
21 changes: 0 additions & 21 deletions dv/.github/workflows/test.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions fw/.github/workflows/codeql-analysis.yml

This file was deleted.

0 comments on commit ab9567e

Please sign in to comment.