mirror of
https://github.com/forta-network/go-multicall.git
synced 2026-02-26 07:37:23 +00:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: coverage
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
name: Update coverage badge
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.19'
|
|
cache: false
|
|
- name: Run Test
|
|
run: make cover
|
|
- name: Go Coverage Badge
|
|
uses: tj-actions/coverage-badge-go@v2
|
|
with:
|
|
text: coverage
|
|
filename: coverage.out
|
|
- name: Verify Changed files
|
|
uses: tj-actions/verify-changed-files@v12
|
|
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 "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add README.md
|
|
git commit -m "chore: update 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 }}
|