Merge pull request #85 from amenzhinsky/dependabot/go_modules/golang.… #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.17' | |
- name: Run go test | |
run: go test -v ./... | |
env: | |
TEST_IOTHUB_SERVICE_CONNECTION_STRING: ${{ secrets.TEST_IOTHUB_SERVICE_CONNECTION_STRING }} | |
TEST_EVENTHUB_CONNECTION_STRING: ${{ secrets.TEST_EVENTHUB_CONNECTION_STRING }} | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.43 | |
args: --enable=goimports,gofumpt,whitespace,exportloopref |