Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Align GitLab CI/CD config with GitHub Actions. (#179)
- Loading branch information
Showing
10 changed files
with
187 additions
and
161 deletions.
There are no files selected for viewing
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
- main | ||
- merge_requests | ||
parallel: | ||
matrix: | ||
- PYTHON_VERSION: | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
script: | ||
- env | sort | ||
- make dev | ||
- make lint test docs build | ||
stage: ci |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
lint_title: | ||
interruptible: true | ||
only: | ||
- merge_requests | ||
script: | ||
- | | ||
if ! echo "$CI_MERGE_REQUEST_TITLE" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then | ||
echo "The title does not conform to the Conventional Commit." | ||
echo "Please refer to 'https://www.conventionalcommits.org/'" | ||
exit 1 | ||
fi | ||
stage: ci |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
docs: | ||
artifacts: | ||
paths: | ||
- public | ||
- docs/changelog.md | ||
- release-notes.md | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-docs | ||
- make docs | ||
- make release-notes > release-notes.md | ||
stage: release | ||
package: | ||
needs: | ||
- release | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-package | ||
- make build | ||
- make upload | ||
stage: release | ||
variables: | ||
TWINE_NON_INTERACTIVE: 'true' | ||
pages: | ||
artifacts: | ||
paths: | ||
- public | ||
needs: | ||
- release | ||
- docs | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
stage: release | ||
release: | ||
image: registry.gitlab.com/gitlab-org/release-cli:latest | ||
needs: | ||
- docs | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
release: | ||
description: release-notes.md | ||
tag_name: $CI_COMMIT_TAG | ||
script: | ||
- env | sort | ||
stage: release |
File renamed without changes.
86 changes: 1 addition & 85 deletions
86
...'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab-ci.yml[% endif %].jinja
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,6 @@ | ||
[% from pathjoin("includes", "version_compare.jinja") import version_between -%] | ||
stages: | ||
- ci | ||
- release | ||
default: | ||
image: python:{{ default_py }} | ||
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: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
- main | ||
- merge_requests | ||
parallel: | ||
matrix: | ||
- PYTHON_VERSION: | ||
[%- if version_between("3.8", min_py, max_py) %] | ||
- '3.8' | ||
[%- endif %] | ||
[%- if version_between("3.9", min_py, max_py) %] | ||
- '3.9' | ||
[%- endif %] | ||
[%- if version_between("3.10", min_py, max_py) %] | ||
- '3.10' | ||
[%- endif %] | ||
[%- if version_between("3.11", min_py, max_py) %] | ||
- '3.11' | ||
[%- endif %] | ||
script: | ||
- env | sort | ||
- make dev | ||
- make lint test docs build | ||
stage: ci | ||
lint_title: | ||
interruptible: true | ||
only: | ||
- merge_requests | ||
script: | ||
- | | ||
if ! echo "$CI_MERGE_REQUEST_TITLE" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then | ||
echo "The title does not conform to the Conventional Commit." | ||
echo "Please refer to 'https://www.conventionalcommits.org/'" | ||
exit 1 | ||
fi | ||
stage: ci | ||
package: | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-package | ||
- make build | ||
- make upload | ||
stage: release | ||
variables: | ||
TWINE_NON_INTERACTIVE: 'true' | ||
pages: | ||
artifacts: | ||
paths: | ||
- public | ||
except: | ||
refs: | ||
- schedules | ||
only: | ||
changes: | ||
- docs/**/* | ||
refs: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-docs | ||
- make docs | ||
stage: release | ||
release: | ||
image: registry.gitlab.com/gitlab-org/release-cli:latest | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
release: | ||
description: $CI_COMMIT_TAG_MESSAGE | ||
name: $CI_COMMIT_TAG | ||
tag_name: $CI_COMMIT_TAG | ||
script: | ||
- env | sort | ||
stage: release | ||
include: .gitlab/ci/**.yml |
34 changes: 34 additions & 0 deletions
34
...tlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/ci/ci.yml.jinja
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[% from pathjoin("includes", "version_compare.jinja") import version_between -%] | ||
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: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
- main | ||
- merge_requests | ||
parallel: | ||
matrix: | ||
- PYTHON_VERSION: | ||
[%- if version_between("3.8", min_py, max_py) %] | ||
- '3.8' | ||
[%- endif %] | ||
[%- if version_between("3.9", min_py, max_py) %] | ||
- '3.9' | ||
[%- endif %] | ||
[%- if version_between("3.10", min_py, max_py) %] | ||
- '3.10' | ||
[%- endif %] | ||
[%- if version_between("3.11", min_py, max_py) %] | ||
- '3.11' | ||
[%- endif %] | ||
script: | ||
- env | sort | ||
- make dev | ||
- make lint test docs build | ||
stage: ci |
12 changes: 12 additions & 0 deletions
12
...== 'gitlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/ci/mr.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
lint_title: | ||
interruptible: true | ||
only: | ||
- merge_requests | ||
script: | ||
- | | ||
if ! echo "$CI_MERGE_REQUEST_TITLE" | grep -Pq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*"; then | ||
echo "The title does not conform to the Conventional Commit." | ||
echo "Please refer to 'https://www.conventionalcommits.org/'" | ||
exit 1 | ||
fi | ||
stage: ci |
51 changes: 51 additions & 0 deletions
51
...itlab.com' or repo_host_type == 'gitlab-self-managed' %].gitlab[% endif %]/ci/release.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
docs: | ||
artifacts: | ||
paths: | ||
- public | ||
- docs/changelog.md | ||
- release-notes.md | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-docs | ||
- make docs | ||
- make release-notes > release-notes.md | ||
stage: release | ||
package: | ||
needs: | ||
- release | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
- make dev-package | ||
- make build | ||
- make upload | ||
stage: release | ||
variables: | ||
TWINE_NON_INTERACTIVE: 'true' | ||
pages: | ||
artifacts: | ||
paths: | ||
- public | ||
needs: | ||
- release | ||
- docs | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
script: | ||
- env | sort | ||
stage: release | ||
release: | ||
image: registry.gitlab.com/gitlab-org/release-cli:latest | ||
needs: | ||
- docs | ||
only: | ||
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/ | ||
release: | ||
description: release-notes.md | ||
tag_name: $CI_COMMIT_TAG | ||
script: | ||
- env | sort | ||
stage: release |