feat: Moving actions into root dir. #2
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
on: | |
workflow_call: | |
inputs: | |
test-dirs: | |
description: Space-separated list of directories to test | |
required: false | |
default: ./ | |
type: string | |
ref-name: | |
description: The name of the branch to calculate coverage | |
required: false | |
default: '' | |
type: string | |
go-cover-path: | |
description: The path to the coverage file generated in the test | |
required: false | |
default: ./cover.out | |
type: string | |
threshold-file: | |
description: The threshold for a singular file | |
required: false | |
default: '-1' | |
type: string | |
threshold-package: | |
description: The threshold for a singular package | |
required: false | |
default: '-1' | |
type: string | |
threshold-total: | |
description: The threshold required for the entire repo | |
required: false | |
default: '70' | |
type: string | |
workflow-ref: | |
description: If running this on a branch e.g. for testing, you can specify that branch here | |
required: false | |
default: '' | |
type: string | |
env: | |
ACTIONS_REPO: skiff-sh/gh-actions | |
jobs: | |
go-test: | |
name: Go test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
with: | |
token: '${{ github.token }}' | |
- uses: actions/checkout@v4 | |
name: Checkout Skiff actions | |
with: | |
repository: '${{ env.ACTIONS_REPO }}' | |
path: './.github/gh-actions' | |
ref: ${{ inputs.workflow-ref }} | |
token: '${{ github.token }}' | |
- uses: .github/gh-actions/go | |
name: Setup go | |
- uses: .github/gh-actions/go-test | |
with: | |
dirs: ${{ inputs.dirs }} | |
- uses: .github/gh-actions/go-coverage | |
with: | |
ref-name: ${{ inputs.ref-name }} | |
go-cover-path: ${{ inputs.go-cover-path }} | |
threshold-file: ${{ inputs.threshold-file }} | |
threshold-package: ${{ inputs.threshold-package }} | |
threshold-total: ${{ inputs.threshold-total }} | |
gh-token: ${{ secrets.BOT_TOKEN }} | |