Refactor into separate packages & add tests. #3
Workflow file for this run
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
name: Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Build | |
run: go build -v | |
- name: Prepare ip routes | |
run: | | |
sudo ip rule add from 127.0.0.1/8 iif lo table 123 | |
sudo ip route add local 0.0.0.0/0 dev lo table 123 | |
sudo ip -6 rule add from ::1/128 iif lo table 123 | |
sudo ip -6 route add local ::/0 dev lo table 123 | |
- name: Test | |
run: sudo go test -v -timeout 30s ./tests |