Skip to content

2 minute timeout for lint actio (#10) #33

2 minute timeout for lint actio (#10)

2 minute timeout for lint actio (#10) #33

Workflow file for this run

name: ci
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
- release-*
# Run tests for PRs
pull_request:
branches:
- main
- release-*
env:
VAULT_ADDR: https://vault.eng.aserto.com/
PRE_RELEASE: ${{ github.ref == 'refs/heads/main' && 'development' || '' }}
GO_VERSION: "1.19"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Read Configuration
uses: hashicorp/vault-action@v2.4.3
id: vault
with:
url: ${{ env.VAULT_ADDR }}
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY;
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup caching
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.2
args: --timeout=2m
- name: Test Setup
uses: autero1/action-gotestsum@v2.0.0
with:
gotestsum_version: 1.10.0
- name: Test
run: |
gotestsum --format short-verbose -- -count=1 -v -timeout=240s -coverprofile=cover.out -coverpkg=./... ./...
- name: Upload code coverage
uses: shogo82148/actions-goveralls@v1
continue-on-error: true
with:
path-to-profile: cover.out