Skip to content

Commit

Permalink
ci: add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Apr 26, 2024
1 parent 8d9b458 commit 254957e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
open-pull-requests-limit: 10
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
open-pull-requests-limit: 5
schedule:
interval: monthly
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
workflow_dispatch:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]

permissions:
contents: read

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Set up deps
run: |
sudo apt-get install -y gcc flex bison make
- name: Build
run: make build

- name: Test
run: go test -v ./...

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $(LIBPCAP_OBJ): $(LIBPCAP_SRC) $(wildcard $(LIBPCAP_SRC)/*.[ch]) | $(LIBPCAP_DIS
$(MAKE) install prefix=$(LIBPCAP_DIST_DIR)

$(LIBPCAP_SRC):
ifeq ($(wildcard $@), )
ifeq ($(wildcard $@/configure), )
echo "INFO: updating submodule 'libpcap'"
$(GIT) submodule update --init --recursive
endif
Expand Down

0 comments on commit 254957e

Please sign in to comment.