Configure Renovate #29
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: PR | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- .gitignore | |
env: | |
GO_VERSION: 1.18 | |
jobs: | |
unit-tests: | |
name: 'Unit tests' | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- id: go-cache-paths | |
run: | | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
# Cache go mod cache to speedup deps downloads | |
- name: Go Mod Cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-mod- | |
- name: 'Run unit tests and generage HTML coverage report' | |
run: | | |
make unit-test | |
- name: Update codecov report | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./build/coverage/ut_cov.out | |
fail_ci_if_error: false | |
verbose: true | |
unit-tests-race-detection: | |
name: "Testing with race detection enabled on ${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-20.04" ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup golang with the appropriate version | |
uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Run tests with atomic race detection enabled | |
run: make test-race | |
lint: | |
name: 'Linting tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run tests with atomic race detection enabled | |
run: make test-lint |