Add SetOption to example #94
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '**' ] | |
name: Go | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.14.x, 1.20.x, 1.21.x, 1.22.x] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
exclude: | |
# There is no arm64 version of Go for darwin | |
- go-version: "1.14.x" | |
platform: "macos-latest" | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download Go dependencies | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go mod download | |
- name: Test with -race | |
run: go test -race -count=1 ./... | |
- name: Integration test | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.22') | |
run: | | |
sudo modprobe nfnetlink_queue | |
sudo ip6tables -I OUTPUT -p ipv6-icmp -j NFQUEUE --queue-num 100 | |
sudo iptables -I OUTPUT -p icmp -j NFQUEUE --queue-num 100 | |
go test -v -tags integration -exec=sudo -count=1 ./... | |
- name: staticcheck.io | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.22') | |
uses: dominikh/[email protected] | |
with: | |
version: "2023.1.7" | |
install-go: false | |
cache-key: ${{ matrix.go-version }} |