add test for prepScript to ensure the cleanup was invoked #963
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: build | |
on: | |
push: | |
branches: | |
tags: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: set up go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23" | |
id: go | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: build and test | |
run: | | |
chmod 0600 ./pkg/executor/testdata/test_ssh_key | |
go test -v -timeout=100s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./... | |
cat $GITHUB_WORKSPACE/profile.cov_tmp | grep -v "mocks" | grep -v "_mock" > $GITHUB_WORKSPACE/profile.cov | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
- name: install goveralls | |
run: go install github.com/mattn/goveralls@latest | |
- name: submit coverage | |
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |