Make ignore main optional #38
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
name: Integration Test | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: run tests | |
run: | | |
go test ./... -coverprofile=coverage.out | |
- name: generate diff | |
run: | | |
git diff origin/${{ github.base_ref }} origin/${{ github.head_ref }} > pr.diff | |
- name: self test | |
id: selftest | |
uses: panagiotisptr/cov-diff@main | |
with: | |
path: . | |
coverprofile: coverage.out | |
diff: pr.diff | |
module: github.com/panagiotisptr/cov-diff | |
- name: Comment | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
Coverage on new code: ${{ steps.selftest.outputs.covdiff }}% |