Skip to content

Commit

Permalink
ci: Fix coverage report for GitLab CI/CD with stage name refined. (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Sep 12, 2023
1 parent ed7a894 commit c4f622a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
20 changes: 13 additions & 7 deletions .gitlab-ci.yml
@@ -1,6 +1,6 @@
stages:
- lint_test
- build_release
- ci
- release
default:
image: python:3.11
lint_title:
Expand All @@ -14,8 +14,14 @@ lint_title:
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
stage: lint_test
stage: ci
ci:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
image: python:$PYTHON_VERSION
interruptible: true
only:
Expand All @@ -33,7 +39,7 @@ ci:
- env | sort
- make dev
- make lint test docs build
stage: lint_test
stage: ci
package:
only:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
Expand All @@ -42,7 +48,7 @@ package:
- make dev-package
- make build
- make upload
stage: build_release
stage: release
variables:
TWINE_NON_INTERACTIVE: 'true'
pages:
Expand All @@ -61,7 +67,7 @@ pages:
- env | sort
- make dev-docs
- make docs
stage: build_release
stage: release
release:
release:
description: $CI_COMMIT_TAG_MESSAGE
Expand All @@ -72,4 +78,4 @@ release:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
stage: build_release
stage: release
@@ -1,7 +1,7 @@
[% from pathjoin("includes", "version_compare.jinja") import version_between -%]
stages:
- lint_test
- build_release
- ci
- release
default:
image: python:{{ default_py }}
lint_title:
Expand All @@ -15,8 +15,14 @@ lint_title:
echo "Please refer to 'https://www.conventionalcommits.org/'"
exit 1
fi
stage: lint_test
stage: ci
ci:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
image: python:$PYTHON_VERSION
interruptible: true
only:
Expand All @@ -42,7 +48,7 @@ ci:
- env | sort
- make dev
- make lint test docs build
stage: lint_test
stage: ci
package:
only:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
Expand All @@ -51,7 +57,7 @@ package:
- make dev-package
- make build
- make upload
stage: build_release
stage: release
variables:
TWINE_NON_INTERACTIVE: 'true'
pages:
Expand All @@ -70,7 +76,7 @@ pages:
- env | sort
- make dev-docs
- make docs
stage: build_release
stage: release
release:
release:
description: $CI_COMMIT_TAG_MESSAGE
Expand All @@ -81,4 +87,4 @@ release:
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
stage: build_release
stage: release

0 comments on commit c4f622a

Please sign in to comment.