From ab4cd23987324fe9d599930da031837555345480 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 25 Jan 2022 18:48:36 +0100 Subject: [PATCH] add build on macOS test netlink is Linux-only, but adding this test ensures that netlink builds without error on macOS, which helps catch missing build tags. --- .github/workflows/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4db7246..0e480f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,3 +24,21 @@ jobs: - name: Test run: sudo -E env PATH=$PATH go test -v ./ ./nl + + build-macos: + # netlink is Linux-only, but this ensures that netlink builds without error + # on macOS, which helps catch missing build tags. + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Build + run: go build ./... + + - name: Test + run: go test ./...