name: ci
on:
  pull_request:
    branches:
    - '*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Set up Go 1.15
      uses: actions/setup-go@v1
      with:
        go-version: 1.15
      id: go

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2

    - name: Add GOPATH/bin to PATH
      run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

    - name: Install dependencies
      run: go mod download

    - name: Ensure go.mod is already tidied
      run: go mod tidy && git diff --no-patch --exit-code
    
    - name: Run Unit Tests
      run: go test ./...

    - name: Verify building
      run: CGO_ENABLED=0 go build -o rootfs/haproxy-ingress pkg/main.go 
      


Migrate Travis CI to Github Actions
Migrate Travis CI to Github Actions
