security testing, do not merge #972
Workflow file for this run
This file contains hidden or 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: go_test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request_target: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| if: ${{ github.event_name == 'pull_request_target' }} | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR | |
| - uses: actions/checkout@v2 | |
| if: ${{ github.event_name != 'pull_request_target' }} | |
| - uses: hashicorp/setup-terraform@v1 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.18.3 | |
| - name: Setup protoc plugins | |
| run: | | |
| go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 | |
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 | |
| - name: Set up protoc | |
| uses: arduino/setup-protoc@v1 | |
| - name: Install dependencies | |
| run: | | |
| go version | |
| go install golang.org/x/lint/golint@latest | |
| - name: Mod tidy | |
| run: go mod tidy | |
| - name: Build | |
| run: make build | |
| - name: Run vet & lint | |
| run: | | |
| go vet . | |
| golint . | |
| - name: Test | |
| run: go test ./test/... -v --tags=plan . | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: "eu-west-1" | |
| ARM_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }} | |
| ARM_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }} | |
| ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| ARM_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }} | |
| GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} |