-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 'github-mirror'
Update mirror branch for v0.12.0 See merge request galactipy/galactipy!45
- Loading branch information
Showing
18 changed files
with
465 additions
and
230 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -152,6 +152,7 @@ htmlcov/ | |
.cache | ||
nosetests.xml | ||
coverage.xml | ||
test_report.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
|
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 |
---|---|---|
|
@@ -14,13 +14,33 @@ variables: | |
SEMVER_RELEASE_VERSION: /^(v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/i | ||
SEMVER_MINOR_VERSION: /^(v)?(0|[1-9]\d*)\.(0|[1-9]\d*)\.0$/i | ||
|
||
# Anchors and script templates | ||
.filechecks: &filechecks | ||
- "{{ cookiecutter.repo_name }}/**/*" | ||
- hooks/* | ||
- tests/* | ||
- utils/* | ||
- tasks.py | ||
- cookiecutter.json | ||
- .gitlab-ci.yml | ||
- .triage-policies.yml | ||
|
||
.default_scripts: &default_scripts | ||
- invoke install --ignore-pty | ||
- invoke check-linter | ||
- invoke test | ||
- invoke check-safety | ||
|
||
# CI definitions | ||
workflow: | ||
rules: | ||
- if: $CI_COMMIT_TITLE =~ /(\:construction|WIP)\:.*/i | ||
when: never | ||
- if: $CI_COMMIT_BRANCH =~ /^test.*/i | ||
when: never | ||
- if: $CI_COMMIT_BRANCH || $CI_COMMIT_TAG | ||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' | ||
- if: $CI_COMMIT_TAG | ||
- if: $CI_COMMIT_BRANCH | ||
|
||
include: | ||
- component: $CI_SERVER_FQDN/components/gitlab-triage/[email protected] | ||
|
@@ -36,36 +56,29 @@ default: | |
paths: | ||
- $CI_PROJECT_DIR/.cache/pip | ||
|
||
# Template job for running tests | ||
.test_rules: | ||
rules: | ||
- if: | ||
changes: | ||
paths: | ||
- "{{ cookiecutter.repo_name }}/**/*" | ||
- hooks/* | ||
- tests/* | ||
- utils/* | ||
- tasks.py | ||
- cookiecutter.json | ||
- .gitlab-ci.yml | ||
- .triage-policies.yml | ||
compare_to: $CI_DEFAULT_BRANCH | ||
- if: $CI_COMMIT_TAG | ||
when: never | ||
- if: $CI_PIPELINE_SOURCE == 'schedule' | ||
when: never | ||
- if: $CI_MERGE_REQUEST_TITLE =~ /^Draft\:.*/i | ||
when: manual | ||
- if: $GITLAB_USER_LOGIN =~ /^(project|group)_\d+_bot_\w+/i | ||
when: never | ||
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != 'merge_request_event' | ||
changes: | ||
paths: *filechecks | ||
compare_to: $CI_DEFAULT_BRANCH | ||
when: manual | ||
- if: $CI_MERGE_REQUEST_TITLE =~ /^Draft\:.*/i | ||
changes: | ||
paths: *filechecks | ||
when: manual | ||
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH | ||
changes: | ||
paths: *filechecks | ||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | ||
|
||
.default_scripts: &default_scripts | ||
- invoke install --ignore-pty | ||
- invoke check-linter | ||
- invoke test | ||
- invoke check-safety | ||
|
||
test-py310: | ||
stage: test | ||
image: registry.gitlab.com/galactipy/docker:3.10 | ||
|
@@ -95,26 +108,31 @@ test-py313: | |
name: coverage_$CI_COMMIT_REF_NAME_$CI_JOB_NAME_$CI_JOB_STARTED_AT | ||
paths: | ||
- coverage.xml | ||
- test_report.xml | ||
reports: | ||
coverage_report: | ||
coverage_format: cobertura | ||
path: coverage.xml | ||
junit: test_report.xml | ||
expire_in: 1 week | ||
script: | ||
- *default_scripts | ||
- invoke coverage | ||
|
||
coveralls-report: | ||
codacy-report: | ||
stage: coverage | ||
image: alpine:latest | ||
rules: | ||
- if: $CI_COMMIT_TAG | ||
when: never | ||
- if: $GITLAB_USER_LOGIN =~ /^(project|group)_\d+_bot_\w+/i | ||
when: never | ||
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH | ||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != 'schedule' | ||
script: | ||
- apk add curl | ||
- curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin | ||
- coveralls -f coverage.xml -r $COVERALLS_TOKEN | ||
- curl -Ls https://coverage.codacy.com/get.sh -o codacy.sh | ||
- sh ./codacy.sh report -r coverage.xml | ||
|
||
changelog-build: | ||
stage: release | ||
|
@@ -139,15 +157,17 @@ changelog-commit: | |
rules: | ||
- if: $CI_COMMIT_TAG =~ $SEMVER_RELEASE_VERSION | ||
needs: [changelog-build] | ||
variables: | ||
CHANGELOG_COMMIT_MESSAGE: "%3Abookmark%3A%20Update%20CHANGELOG.md" | ||
script: | ||
- apk add curl | ||
- > | ||
cat $CHANGELOG_COMMIT_PAYLOAD | ||
| | ||
curl | ||
--header "PRIVATE-TOKEN: $GALACTIPY_BOT_TOKEN" | ||
--header "Content-Type: application/json" | ||
--data @- | ||
--request POST | ||
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog?version=$CI_COMMIT_TAG&message=$CHANGELOG_COMMIT_MESSAGE" | ||
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog" | ||
release-galactipy: | ||
stage: release | ||
|
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
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 |
---|---|---|
|
@@ -131,4 +131,3 @@ For answers to common questions about this code of conduct, see the FAQ at | |
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations | ||
[mail]: mailto:[email protected] | ||
|
Oops, something went wrong.