forked from open-turo/actions-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
28 lines (28 loc) · 995 Bytes
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: "golang: Test"
description: GitHub Action that executes unit tests present anywhere within a golang based GitHub repository and reports results including coverage metrics
inputs:
checkout-repo:
required: false
description: Perform checkout as first step of action
default: "true"
github-token:
required: true
description: GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN'
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
if: inputs.checkout-repo == 'true'
with:
fetch-depth: 0
- name: Setup tools
## Installs version of golang found in .go-version
uses: open-turo/action-setup-tools@v1
- name: Authorize
uses: open-turo/action-git-auth@v2
with:
github-personal-access-token: ${{ inputs.github-token }}
- name: Execute all go tests with coverage in current and all subdirectories
shell: bash
run: go test -cover ./...