Skip to content

Improve obs

Improve obs #22

Workflow file for this run

name: Run Tests
on: [pull_request, workflow_dispatch]
jobs:
Run-Tests:
runs-on: ubuntu-latest
steps:
- name: "get go version"
uses: actions/setup-go@v3
with:
go-version: ^1.19
- name: "checkout repo"
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: "fetch dependencies"
run: go get -t -u ./...
- name: "run test"
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: make cicoverage
- name: Go Coverage Badge
uses: tj-actions/[email protected]
with:
filename: coverage.out
- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: README.md
- name: Commit changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: Updated coverage badge."
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.head_ref }}