Skip to content

fix badge command

fix badge command #12

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Run Test
run: go test ./src/pkg/interpreter/interpreter_test.go -coverprofile=./cover.out -covermode=atomic -coverpkg=./src/pkg/...
- name: check test coverage
uses: vladopajic/go-test-coverage@v2
with:
# Configure action using config file (option 1)
config: ./.testcoverage.yml
# Configure action by specifying input parameters individually (option 2)
profile: cover.out
local-prefix: github.com/hutcho66/glox/src/pkg
threshold-file: 0
threshold-package: 0
threshold-total: 80
git-branch: badges
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}