-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e15af26
commit 91493f5
Showing
12 changed files
with
281 additions
and
106 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Changes here will be overwritten by Copier | ||
_commit: v5.3.0 | ||
_commit: v6.0.1 | ||
_src_path: gh:eccenca/cmem-plugin-template | ||
author_mail: info@eccenca.com | ||
author_mail: cmempy-developer@eccenca.com | ||
author_name: eccenca GmbH | ||
github_page: '' | ||
github_page: https://github.com/eccenca/cmem-plugin-uuid | ||
project_description: Generate UUIDv1, 3, 4, 5, 6, 7 and 8 literals. | ||
project_slug: uuid | ||
pypi: false | ||
pypi: true | ||
|
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,76 @@ | ||
--- | ||
name: check | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" and "develop" branch | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check: | ||
|
||
runs-on: ubuntu-latest | ||
concurrency: testing_environment | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
|
||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install and configure poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
- name: Install dynamic versioning plugin | ||
run: | | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
- name: mypy | ||
run: | | ||
task check:mypy | ||
- name: ruff | ||
run: | | ||
task check:ruff | ||
- name: pytest | ||
env: | ||
CMEM_BASE_URI: ${{ secrets.CMEM_BASE_URI }} | ||
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }} | ||
run: | | ||
task check:pytest | ||
- name: safety | ||
run: | | ||
task check:safety | ||
- name: Publish Test Report in Action | ||
uses: mikepenz/action-junit-report@v4 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: dist/junit-*.xml | ||
|
||
- name: Publish Test and Coverage Report as PR comment | ||
uses: xportation/junit-coverage-report@main | ||
if: github.event_name == 'pull_request' | ||
with: | ||
junit-path: dist/junit-pytest.xml | ||
coverage-path: dist/coverage.xml | ||
|
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,91 @@ | ||
--- | ||
default: | ||
image: docker-registry.eccenca.com/eccenca-python:v3.11.4 | ||
# all jobs can be interrupted in case a new commit is pushed | ||
interruptible: true | ||
before_script: | ||
# make sure poetry creates virtual environment as .venv | ||
- poetry config virtualenvs.in-project true | ||
cache: | ||
# cache the virtual environment based on the poetry lock file | ||
key: | ||
files: | ||
- poetry.lock | ||
paths: | ||
- .venv | ||
|
||
stages: | ||
- test | ||
- build | ||
- publish | ||
|
||
ruff: | ||
stage: test | ||
script: | ||
- task check:ruff | ||
artifacts: | ||
when: always | ||
reports: | ||
junit: | ||
- dist/junit-ruff.xml | ||
|
||
mypy: | ||
stage: test | ||
script: | ||
- task check:mypy | ||
artifacts: | ||
when: always | ||
reports: | ||
junit: | ||
- dist/junit-mypy.xml | ||
|
||
pytest: | ||
stage: test | ||
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' | ||
script: | ||
- task check:pytest | ||
artifacts: | ||
when: always | ||
reports: | ||
coverage_report: | ||
coverage_format: cobertura | ||
path: dist/coverage.xml | ||
junit: | ||
- dist/junit-pytest.xml | ||
paths: | ||
- dist/badge-coverage.svg | ||
- dist/badge-tests.svg | ||
- dist/coverage | ||
- dist/coverage.xml | ||
|
||
safety: | ||
stage: test | ||
script: | ||
- task check:safety | ||
|
||
build: | ||
stage: build | ||
needs: | ||
- mypy | ||
- pytest | ||
- safety | ||
script: | ||
- task build | ||
artifacts: | ||
when: always | ||
paths: | ||
- dist/*.tar.gz | ||
- dist/*.whl | ||
|
||
pypi: | ||
# publishing only available on a tag | ||
stage: publish | ||
needs: | ||
- ruff | ||
- build | ||
allow_failure: true | ||
when: manual | ||
script: | ||
- poetry config pypi-token.pypi $PYPI_TOKEN | ||
- poetry publish | ||
|
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 @@ | ||
3.11 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
"""uuid - main package""" |
Oops, something went wrong.