Skip to content

Backport of [NET-2420] security: add security scans on protected branches into release/1.1.x #1286

Backport of [NET-2420] security: add security scans on protected branches into release/1.1.x

Backport of [NET-2420] security: add security scans on protected branches into release/1.1.x #1286

name: consul-dataplane-checks
on:
push:
branches:
main
pull_request:
jobs:
get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml
unit-tests:
name: unit-tests
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: go test ./... -p 1 # disable parallelism to avoid port conflicts from default metrics and lifecycle server configuration
integration-tests:
name: integration-tests
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: make docker
# Currently the server version below is set to 1.15-dev: integration-tests/main_test.go
- run: echo "VERSION=$(make version)" >> $GITHUB_ENV
- run: cd integration-tests && go test -dataplane-image="consul-dataplane:${{ env.VERSION }}"
golangci:
name: lint
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3