Skip to content

Commit

Permalink
add ci with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
burizz authored Oct 18, 2020
1 parent 2a0a114 commit 3c962a4
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -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 .

0 comments on commit 3c962a4

Please sign in to comment.