Skip to content

Commit

Permalink
Merge branch 'master' into 'github-mirror'
Browse files Browse the repository at this point in the history
Update mirror branch for v0.12.0

See merge request galactipy/galactipy!45
  • Loading branch information
manoelpqueiroz committed Feb 9, 2025
2 parents dbdcbfd + 15ae95a commit c2dbfd1
Show file tree
Hide file tree
Showing 18 changed files with 465 additions and 230 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
test_report.xml
*.cover
*.py,cover
.hypothesis/
Expand Down
74 changes: 47 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
## 0.12.0 (2025-02-09)

### :rocket: Features (4 changes)

- [:sparkles: Split test and coverage uploads for GitHub templates](galactipy/galactipy@145a7fb3e12e79907d769d04b44f8572af121f46) ([merge request](galactipy/galactipy!44))
- [:sparkles: Implement GitHub coverage action](galactipy/galactipy@39ddf84bdda5ed68898e038828bdaf94ef03fb49) ([merge request](galactipy/galactipy!44))
- [:sparkles: Set up GitLab coverage uploads](galactipy/galactipy@5aef4759c7fc147be6ed2fd4433b64d3be5f0c4d) ([merge request](galactipy/galactipy!44))
- [:sparkles: Add option between code coverage and code analysis](galactipy/galactipy@802dec8fccd4d5705c61ed2ac2834762dd70d469) ([merge request](galactipy/galactipy!44))

### :package: Build System & CI/CD (1 change)

- [:construction_worker: Refine project coverage job](galactipy/galactipy@a9bcedf2fb76979f719ea7578acf305ee0f120ba) ([merge request](galactipy/galactipy!44))

### :gear: Internals (1 change)

- [:pencil2: Fix reference to coverage service in project tasks](galactipy/galactipy@9ee73e8c4c344e6231e46a1d7d9e9397b1098721) ([merge request](galactipy/galactipy!44))

### :construction_site: Template Internals (1 change)

- [:construction_worker: Fix template GitLab CI rules for tests](galactipy/galactipy@b69511410a05645a67d95604eea4e34e79e1541b) ([merge request](galactipy/galactipy!44))

### :memo: Documentation (4 changes)

- [:memo: Include CITATION.cff in READMEs](galactipy/galactipy@2c7debad84e0ef6ba36fcee831a51366a621dc74) ([merge request](galactipy/galactipy!44))
- [:memo: Update template README instructions](galactipy/galactipy@a3dfae1cd0d57a9218fcb4834d3bfcc775fb1c37) ([merge request](galactipy/galactipy!44))
- [:memo: Update project README with coverage features](galactipy/galactipy@87ea836444e4dd3f81f65970e530718f9a00f9e3) ([merge request](galactipy/galactipy!44))
- [:memo: Add code quality service badges for template README](galactipy/galactipy@062701927cbdf3a7f24a01fda8c54596ca1d2f38) ([merge request](galactipy/galactipy!44))

## 0.11.1 (2025-01-26)

### :rocket: Features (1 change)

- [:sparkles: Enable test reports for the template](galactipy/galactipy@0d228762a5372891d487bdc94a58f73656fed647) ([merge request](galactipy/galactipy!42))

### :package: Build System & CI/CD (3 changes)

- [:construction_worker: Enable GitLab test reports for project](galactipy/galactipy@30916dc028316ad1013d0677e558e0572ebadc95) ([merge request](galactipy/galactipy!42))
- [:construction_worker: Replace Coveralls with Codacy](galactipy/galactipy@29da8fe242be6a7ef4ab1d74e2c7ca9d3036d497) ([merge request](galactipy/galactipy!42))
- [:green_heart: Adapt CI to enable Galactipy Bot merges](galactipy/galactipy@85209d71ef2319b4b2abcdf2ae4887033843bd2f) ([merge request](galactipy/galactipy!41))

### :construction_site: Template Internals (1 change)

- [:construction_worker: Refine rules for template CI](galactipy/galactipy@268393b7106914d97a05fcdf5396fbe7e88e0f5e) ([merge request](galactipy/galactipy!42))

### :memo: Documentation (3 changes)

- [:memo: Update project README with test reports feature](galactipy/galactipy@e3090a7212a16a30162b0a9d33516dbfe0471fe0) ([merge request](galactipy/galactipy!42))
- [:memo: Add Codacy badges for the project](galactipy/galactipy@857ef66c2a754c3e78384dc265a4bcc26cb123c1) ([merge request](galactipy/galactipy!42))
- [:memo: Fix Codacy warnings](galactipy/galactipy@7e6b67bfcdba0c7e3a7e7304785a8d8049a96bc8) ([merge request](galactipy/galactipy!42))

## 0.11.0 (2025-01-24)

### :rocket: Features (1 change)
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ keywords:
- semantic-versions
license: MIT
commit: 26e8abffc6648d88f3845ed73192f2f79bab55ff
version: v0.11.0
date-released: '2025-01-24'
version: v0.12.0
date-released: '2025-01-26'
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Loading

0 comments on commit c2dbfd1

Please sign in to comment.