Skip to content

Commit 0c8dd43

Browse files
build: validate only on pr builds and enable coverage comment (#2)
1 parent b251064 commit 0c8dd43

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

.github/workflows/build-python.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: Build and Test Python
22

3-
on:
4-
workflow_call:
5-
inputs:
6-
coverageComment:
7-
description: "Whether to add a comment on test coverage, default is false"
8-
required: false
9-
type: boolean
10-
default: false # disabled for now
3+
on: [workflow_call]
114

125
jobs:
136
build-python:
@@ -37,14 +30,12 @@ jobs:
3730
- name: pytest + coverage
3831
run: |
3932
set -o pipefail
40-
poetry run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=beaker | tee pytest-coverage.txt
33+
poetry run pytest --cov-report xml --cov=beaker
4134
42-
- name: pytest coverage comment
43-
if: inputs.coverageComment
44-
uses: MishaKav/pytest-coverage-comment@main
35+
- uses: codecov/codecov-action@v3
4536
with:
46-
pytest-coverage-path: ./pytest-coverage.txt
47-
junitxml-path: ./pytest.xml
37+
files: ./coverage.xml
38+
verbose: true
4839

4940
- name: stop sandbox
5041
run: docker compose down

.github/workflows/cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575

7676
- name: Create Continuous Deployment - Beta (non-prod)
77-
if: steps.get_branch.outputs.branch == 'master' && inputs.production_release
77+
if: steps.get_branch.outputs.branch == 'master' && !inputs.production_release
7878
run: |
7979
poetry run semantic-release \
8080
-v DEBUG \
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Pull Request and master validation
22

3-
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
3+
on: [pull_request]
84

95
jobs:
106
check:
@@ -14,4 +10,4 @@ jobs:
1410
build:
1511
name: Build and Test Python
1612
needs: check
17-
uses: ./.github/workflows/build-python.yaml
13+
uses: ./.github/workflows/build-python.yaml

0 commit comments

Comments
 (0)