chore: experiment with coverage #22
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
# 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" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
REVISION: ${{ github.event.pull_request.head.sha || github.sha }} | |
jobs: | |
build: | |
name: Build and Test | |
permissions: | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Docker Build | |
run: make docker-build | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test | |
- name: Create cover.txt | |
run: make cover.txt | |
- name: Post Code Coverage Comment | |
uses: actions/github-script@v5 | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
script: await require('${{ github.workspace }}/.github/update-code-coverage-comment.js')({ context, github }) | |
- name: Upload Cover | |
run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make upload-cover-html | |
- name: Cover Check | |
run: make check-cover | |
- name: Version Check | |
run: make check-version | |
- name: Commit Check | |
run: make check-commit message='${{ github.event.pull_request.title }}' |