Skip to content

chore(revdial): add keep-alive timeout #12195

chore(revdial): add keep-alive timeout

chore(revdial): add keep-alive timeout #12195

Workflow file for this run

name: QA
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [assigned, opened, synchronize, reopened, edited, ready_for_review]
jobs:
validate:
name: validate
if: ${{ github.event.pull_request.draft == false }}
strategy:
fail-fast: false
matrix:
project: [api, agent, pkg, ssh, ui, cli, connector]
include:
- project: api
extra_args: ""
lint_args: ""
- project: agent
extra_args: "-tags docker"
lint_args: "--build-tags docker"
- project: pkg
extra_args: ""
lint_args: ""
- project: ssh
extra_args: "-tags internal_api"
lint_args: "--build-tags internal_api"
- project: ui
extra_args: ""
lint_args: ""
- project: cli
extra_args: ""
lint_args: ""
- project: connector
extra_args: ""
lint_args: ""
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
# inline YAML or path to separate file (e.g.: .github/filters.yaml)
filters: |
ui:
- 'ui/**'
go:
- 'api/**'
- 'agent/**'
- 'pkg/**'
- 'ssh/**'
- 'cli/**'
- 'connector/**'
- name: Set up Go 1.x [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
uses: actions/setup-go@v4
with:
go-version: "1.20"
id: go
- name: Cache Go files [Go]
uses: actions/cache@v3
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Get Go dependencies [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: go mod download
- name: Ensure Go dependencies are complete [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: |
../devscripts/prepare-release
if [ -n "$(git status --porcelain)" ]; then
echo "Missing dependencies on 'go.mod'"
exit 1
fi
- name: Unit test [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: go test -v ${{ matrix.extra_args }} ./...
- name: Go build [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: go build -v ${{ matrix.extra_args }} ./...
- name: Code format [Go]
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
if: matrix.os == 'ubuntu-latest' && github.event.pull_request.draft == false
- name: Code linting [Go]
if: matrix.project != 'ui' && steps.filter.outputs.go == 'true' && github.event.pull_request.draft == false
uses: golangci/golangci-lint-action@v3
with:
working-directory: ${{ matrix.project }}
version: v1.53.3
args: ${{ matrix.lint_args }} ./...
skip-pkg-cache: true
- name: Set up Node.JS 18.16.0 [UI]
if: matrix.project == 'ui' && steps.filter.outputs.ui == 'true' && github.event.pull_request.draft == false
uses: actions/setup-node@v4
with:
node-version: "18.16.0"
- name: Cache node modules [UI]
if: matrix.project == 'ui' && steps.filter.outputs.ui == 'true' && github.event.pull_request.draft == false
uses: actions/cache@v3
with:
path: ui/node_modules
key: ${{ runner.OS }}-ui-${{ hashFiles('**/package-lock.json') }}
- name: Install Node Dependencies [UI]
if: matrix.project == 'ui' && steps.filter.outputs.ui == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: npm install
- name: Unit test [UI]
if: matrix.project == 'ui' && steps.filter.outputs.ui == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: npm run test
- name: Save Code Linting Report JSON [UI]
if: matrix.project == 'ui' && steps.filter.outputs.ui == 'true' && github.event.pull_request.draft == false
working-directory: ${{ matrix.project }}
run: npm run lint