upd to use go-aserto context-cleanup changes #38
Workflow file for this run
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: 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.22" | |
GO_RELEASER_VERSION: "v1.24.0" | |
GO_LANGCI_LINT_VERSION: "v1.56.2" | |
GO_TESTSUM_VERSION: "1.11.0" | |
GOPRIVATE: github.com/aserto-dev | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Read Configuration | |
uses: hashicorp/vault-action@v3 | |
id: vault | |
with: | |
url: ${{ env.VAULT_ADDR }} | |
token: ${{ secrets.VAULT_TOKEN }} | |
secrets: | | |
kv/data/github "SSH_PRIVATE_KEY" | SSH_PRIVATE_KEY; | |
- | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- | |
name: Docker SSH Setup | |
run: | | |
mkdir -p $HOME/.ssh | |
umask 0077 && echo -e "${SSH_PRIVATE_KEY}" > $HOME/.ssh/id_rsa | |
ssh-keyscan github.com >> $HOME/.ssh/known_hosts | |
git config --global url."git@github.com:".insteadOf https://github.com/ | |
git config --global user.email "github-bot@aserto.com" | |
git config --global user.name "Aserto Bot" | |
eval `ssh-agent` | |
ssh-add $HOME/.ssh/id_rsa | |
- | |
name: Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: ${{ env.GO_LANGCI_LINT_VERSION }} | |
args: --timeout=30m | |
- | |
name: Test Setup | |
uses: gertd/action-gotestsum@v3.0.0 | |
with: | |
gotestsum_version: ${{ env.GO_TESTSUM_VERSION }} | |
- | |
name: Test | |
run: | | |
gotestsum --format short-verbose -- -count=1 -v github.com/aserto-dev/aserto-management/... -timeout=240s ./... |