From 3c962a4d286252c234ed1f7cb4359abebdbd92e7 Mon Sep 17 00:00:00 2001 From: Boris Yakimov Date: Sun, 18 Oct 2020 18:07:36 +0300 Subject: [PATCH] add ci with github actions --- .github/workflows/go.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..1dee023 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,43 @@ +name: whitelist-aws-ips-Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + env: + # Setup GOPATH in current workspace dir + GOPATH: ${{ github.workspace }} + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15 + id: go + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + # Clone repo inside GOPATH/src/ dir + path: ./src/github.com/${{ github.repository }} + - name: Get dependencies + run: | + cd ./src/github.com/${{ github.repository }} + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + ls -lah + ls -lah ${{ github.workspace }} + + - name: Build + run: cd ./src/github.com/${{ github.repository }} && go build -v . + + - name: Test + run: cd ./src/github.com/${{ github.repository }} && go test -v .