feat: Track code coverage #4
Workflow file for this run
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: Go Test on Pull Requests | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
go: | |
name: Check sources | |
runs-on: ubuntu-20.04 | |
env: | |
OPERATOR_SDK_VERSION: v1.18.0 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
docker: | |
name: Check docker build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Check if dockerimage build is working | |
run: docker build -f ./Dockerfile . | |
gitlint: | |
name: Run gitlint checks | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install gitlint into container | |
run: python -m pip install gitlint | |
- name: Run gitlint check | |
run: gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD |