From 715e31cb3c3147ec5d7f5dba50835cf1e5d0516f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 30 Dec 2020 15:21:48 +0100 Subject: [PATCH] switch from travis to GitHub actions --- .github/workflows/push.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 18 ------------------ 2 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/push.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..b5a6a4e --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,33 @@ +name: Push + +on: + push: + branches: [ master ] + +jobs: + + build: + name: CI + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + # Run on the latest minor release of Go 1.15: + go-version: ^1.15 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Ensure all files were formatted as per gofmt + run: | + [ "$(gofmt -l $(find . -name '*.go') 2>&1)" = "" ] + + - name: Run tests + run: | + go vet . + go test ./... + go test -c github.com/google/nftables + sudo ./nftables.test -test.v -run_system_tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4103b0b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Use the (faster) container-based infrastructure, see also -# http://docs.travis-ci.com/user/workers/container-based-infrastructure/ -sudo: true -dist: trusty - -language: go -go: - - "1.13" - -script: - # Check whether files are syntactically correct. - - "gofmt -l $(find . -name '*.go' | tr '\\n' ' ') >/dev/null" - # Check whether files were not gofmt'ed. - - "gosrc=$(find . -name '*.go' | tr '\\n' ' '); [ $(gofmt -l $gosrc 2>&- | wc -l) -eq 0 ] || (echo 'gofmt was not run on these files:'; gofmt -l $gosrc 2>&-; false)" - - go vet . - - go test ./... - - go test -c github.com/google/nftables - - sudo ./nftables.test -test.v -run_system_tests