| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- name: Continuous integration
- on: [push]
- jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- env:
- GO111MODULE: "on"
- steps:
- - name: Set up Go 1.15
- uses: actions/setup-go@v1
- with:
- go-version: 1.15
- id: go
- - name: Checkout code into the Go module directory
- uses: actions/checkout@v2
- # https://github.com/dependabot/dependabot-core/issues/1995
- - name: Update dependabot PR
- if: github.event.pusher.name == 'dependabot-preview[bot]'
- run: |
- git config --local user.email "[email protected]"
- git config --local user.name "CI GitHub Action"
- go mod tidy -v
- git add .
- git commit -sm'Update go.sum after dependabot PR'
- - name: Update dependabot PR if needed
- if: github.event.pusher.name == 'dependabot-preview[bot]'
- uses: ad-m/github-push-action@master
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- branch: ${{ github.ref }}
- force: false
- - name: Validate go-mod is up-to-date and license headers
- run: make validate
- - name: Validate imports
- run: make import-restrictions
- - name: Run golangci-lint
- run: |
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . v1.30.0
- ./golangci-lint run --timeout 10m0s
- build:
- name: Build
- runs-on: ubuntu-latest
- env:
- GO111MODULE: "on"
- steps:
- - name: Set up Go 1.15
- uses: actions/setup-go@v1
- with:
- go-version: 1.15
- id: go
- - name: Checkout code into the Go module directory
- uses: actions/checkout@v2
- - uses: actions/cache@v2
- with:
- path: ~/go/pkg/mod
- key: go-${{ hashFiles('**/go.sum') }}
- - name: Test
- env:
- BUILD_TAGS: example,local,ecs
- run: make -f builder.Makefile test
- - name: Build
- env:
- BUILD_TAGS: example,local,ecs
- run: make -f builder.Makefile cli
- - name: E2E Test
- run: make e2e-local
|