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
60 changes: 60 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
stages:
- lint_test
- build_release
lint:
image: python:3.11
interruptible: true
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
- make dev-lint
- make lint
stage: lint_test
test:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
image: python:3.11
interruptible: true
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
- make dev-tests
- make tests
stage: lint_test
package:
image: python:3.11
interruptible: true
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: build_release
pages:
artifacts:
paths:
- public
except:
refs:
- schedules
image: python:3.11
interruptible: true
only:
changes:
- docs/**/*
refs:
- master
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- make dev-docs
- make docs
stage: build_release
60 changes: 60 additions & 0 deletions .gitlab-ci.yml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
stages:
- lint_test
- build_release
lint:
image: {{ ci_image }}
interruptible: true
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
- make dev-lint
- make lint
stage: lint_test
test:
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
image: {{ ci_image }}
interruptible: true
only:
- merge_requests
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- env | sort
- make dev-tests
- make tests
stage: lint_test
package:
image: {{ ci_image }}
interruptible: true
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: build_release
pages:
artifacts:
paths:
- public
except:
refs:
- schedules
image: {{ ci_image }}
interruptible: true
only:
changes:
- docs/**/*
refs:
- master
- /^v(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)$/
script:
- make dev-docs
- make docs
stage: build_release
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@
"repo_name",
"package_name",
"module_name",
"test_coverage_threshold"
"ci_image",
"test_coverage_threshold",
"stages",
"lint",
"test",
"package",
"pages"
],
"vscode-yaml-sort.noCompatMode": true,
"vscode-yaml-sort.sortOnSave": 2,
Expand Down
4 changes: 4 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ module_name:
default: '{{ package_name|lower|replace("-", "_") }}'
help: 'Module name:'
type: str
ci_image:
default: python:3.11
help: 'Container image to run CI:'
type: str
test_coverage_threshold:
default: 100
help: 'Threshold for test coverage:'
Expand Down