Skip to content

Bump github.com/vultr/govultr/v3 from 3.8.1 to 3.9.0 #249

Bump github.com/vultr/govultr/v3 from 3.8.1 to 3.9.0

Bump github.com/vultr/govultr/v3 from 3.8.1 to 3.9.0 #249

Workflow file for this run

name: "Unit/Coverage Tests"
on:
pull_request_target:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
outputs:
msg: ${{ steps.results.outputs.content }}
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Run unit tests and coverage test
id: test-coverage
run: |
go test -cover -v ./... > output.txt
- name: Transform output
id: results
if: always()
run: |
CONTENT=$(cat output.txt)
CONTENT="${CONTENT//'%'/'%25'}"
CONTENT="${CONTENT//$'\n'/'%0A'}"
CONTENT="${CONTENT//$'\r'/'%0D'}"
echo "content=$CONTENT" >> $GITHUB_OUTPUT
comment:
runs-on: ubuntu-latest
if: ${{ github.event_name }} != 'push'
needs: coverage
steps:
- name: Add Comment
uses: actions/github-script@v5
if: always()
with:
script: |
const output = `### Unit Tests and Coverage
<details><summary>Show Output</summary>
\`\`\`
${{ needs.coverage.outputs.msg }}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})