Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Code Coverage Report

on:
push:
branches:
- main
pull_request:
branches: [ main ]

jobs:
coverage-report:
name: Check Code Coverage
runs-on: ubuntu-20.04
steps:
-
name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.16.6
-
name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
-
name: Check out code into the Go module directory
uses: actions/checkout@v2
-
name: Cache go modules
id: cache-mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Download dependencies
run: go mod download
if: steps.cache-mod.outputs.cache-hit != 'true'
-
name: Run Go Tests
run: |
python -m pip install --upgrade pip yq
make test
-
name: Build Codecov report
uses: codecov/codecov-action@v1
with:
files: cover.out
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Dev Workspace Operator

[![codecov](https://codecov.io/gh/devfile/devworkspace-operator/branch/main/graph/badge.svg)](https://codecov.io/gh//devfile/devworkspace-operator)

Dev Workspace operator repository that contains the controller for the DevWorkspace Custom Resource. The Kubernetes API of the DevWorkspace is defined in the https://github.com/devfile/api repository.

## DevWorkspace CR
Expand Down Expand Up @@ -180,3 +182,5 @@ This will delete all custom resource definitions created for the controller, as
#### GitHub actions

- [Next Dockerimage](https://github.com/devfile/devworkspace-operator/blob/main/.github/workflows/dockerimage-next.yml) action builds main branch and pushes it to [quay.io/devfile/devworkspace-controller:next](https://quay.io/repository/devfile/devworkspace-controller?tag=latest&tab=tags)

- [Code Coverage Report](./.github/workflows/code-coverage.yml) action creates a code coverage report using [codecov.io](https://about.codecov.io/).
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github_checks:
annotations: false