chore(build): activate github workflows #4
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
- main | |
- master | |
- release/** | |
# Automatically cancel run if another commit to the same ref is detected. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-unit-cover: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- uses: actions/checkout@v4 | |
- uses: technote-space/[email protected] | |
with: | |
PATTERNS: | | |
**/**.sol | |
**/**.go | |
go.mod | |
go.sum | |
- name: Test and Create Coverage Report | |
run: | | |
make test-unit-cover | |
if: env.GIT_DIFF | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.txt | |
fail_ci_if_error: true | |
if: env.GIT_DIFF |