Skip to content

Commit

Permalink
Move code coverage to own github workflow (#90)
Browse files Browse the repository at this point in the history
* Move code coverage to own github workflow

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Remove credentials

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Set workflow to fail-fast false

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test missing code coverage to fail PR

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Remove test script to trigger workflow to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Trigger job to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Fix code coverage

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Fix code coverage

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Update .github/workflows/build-python-app.yml

Co-authored-by: Martin Morgenstern <martin.morgenstern@cloudandheat.com>
Signed-off-by: anjastrunk <119566837+anjastrunk@users.noreply.github.com>

* Integrate review comments

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Test PR to fail

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Increase code coverage

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Increase code coverage

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Increase code coverage

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

* Omit vendor from code coverageas its use is temporary

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>

---------

Signed-off-by: Anja Strunk <anja.strunk@cloudandheat.com>
Signed-off-by: anjastrunk <119566837+anjastrunk@users.noreply.github.com>
Co-authored-by: Martin Morgenstern <martin.morgenstern@cloudandheat.com>
  • Loading branch information
anjastrunk and martinmo committed Apr 30, 2024
1 parent 4092ede commit 9060446
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
14 changes: 9 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[run]
omit =
tests/*
generator/common/gx_schema.py
generator/vendor/*
branch = True
source = generator/

[report]
show_missing = True
skip_empty = True
omit = generator/vendor/*

[xml]
output = coverage.xml
12 changes: 9 additions & 3 deletions .github/workflows/build-python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ on:
pull_request:
branches:
- "main"
paths:
- '**.py'
- .github/workflows/build-python-app.yml


permissions:
contents: read
pull-requests: write

jobs:
build:
build-python-app:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -54,10 +59,11 @@ jobs:

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
with:
recreate: true
path: code-coverage-results.md

- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
if: ${{ !cancelled() }}
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ devops/logs/
devops/plugins/
node_modules
*.tar.gz
.gx-credentials
# Make sure credentials not push to the repo
os_secret
k8s_secret

0 comments on commit 9060446

Please sign in to comment.