Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pla-1615 #36

Merged
merged 4 commits into from
Aug 27, 2024
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ZeroGachis/FWMS_Squad
8 changes: 4 additions & 4 deletions .github/workflows/pullrequest-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v3
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v4
with:
image_name: magicparse
dockerfile_context: .
Expand All @@ -23,7 +23,7 @@ jobs:
[
build,
]
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v3
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v4
with:
image_url: ${{ needs.build.outputs.image-url }}
workdir: /home/src/magicparse
Expand All @@ -39,7 +39,7 @@ jobs:
[
build,
]
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v3
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v4
with:
image_url: ${{ needs.build.outputs.image-url }}
workdir: /home/src/magicparse
Expand All @@ -61,7 +61,7 @@ jobs:
unit-tests,
static-metrics,
]
uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v3
uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v4
with:
image_name: magicparse
image_version: ${{ needs.build.outputs.image-version }}
Expand Down
92 changes: 10 additions & 82 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,19 @@ name: "Release"
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
uses: ZeroGachis/.github/.github/workflows/build-image.yml@v3
with:
image_name: magicparse
dockerfile_context: .
environment_name: main
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }}
regitry_url: ghcr.io
secrets: inherit
branches:
- main

static-metrics:
needs:
[
build,
]
uses: ZeroGachis/.github/.github/workflows/run-docker.yml@v3
with:
image_url: ${{ needs.build.outputs.image-url }}
workdir: /home/src/magicparse
environment_name: main
vault_enabled: false
tailscale_enabled: false
run_command: |
black magicparse/ --check --diff
flake8
secrets: inherit

unit-tests:
needs:
[
build,
]
uses: ZeroGachis/.github/.github/workflows/run-docker-with-db.yml@v3
jobs:
github-release:
uses: ZeroGachis/.github/.github/workflows/gh-release-please.yml@v4
with:
image_url: ${{ needs.build.outputs.image-url }}
workdir: /home/src/magicparse
run_command: |
pytest --verbose --junit-xml reports/unit_tests_results.xml
environment_name: main
vault_enabled: false
tailscale_enabled: false
enable_test_report: true
test_report_name: "UT Report"
test_report_path: reports/unit_tests_results.xml
test_report_format: java-junit
secrets: inherit

major_and_minor_tags: false
publish:
needs:
[
build,
unit-tests,
static-metrics,
]
uses: ZeroGachis/.github/.github/workflows/python-publish.yml@v3
needs: github-release
if: ${{ needs.github-release.outputs.release_created == 'true' }}
uses: ZeroGachis/.github/.github/workflows/python-publish.yml@v4
with:
python_version: "3.10"
environment_name: main

github-release:
needs: [
build,
static-metrics,
unit-tests,
publish,
]
uses: ZeroGachis/.github/.github/workflows/gh-release-notes.yml@v3

detroy:
if: always()
needs:
[
build,
unit-tests,
static-metrics,
publish,
github-release,
]
uses: ZeroGachis/.github/.github/workflows/delete-docker-image.yml@v3
with:
image_name: magicparse
image_version: ${{ needs.build.outputs.image-version }}
environment_name: main
vault_github_actions_role: ${{ vars.VAULT_GITHUB_ACTIONS_ROLE }}
secrets: inherit

3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.14.0"
}
11 changes: 3 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ authors = ["Smartway <[email protected]>"]
readme = "README.md"
repository = "https://github.com/ZeroGachis/magicparse"


[tool.poetry.dependencies]
python = "^3.9"

Expand All @@ -17,14 +18,8 @@ awscli = "~1"
flake8-pyproject = "~1.2.3"

[build-system]
requires = ["poetry-core>=1.2.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"
pattern = "^(?P<base>\\d+\\.\\d+\\.\\d+)(-?((?P<stage>[a-zA-Z]+)\\.?(?P<revision>\\d+)?))?"
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.masonry.api"

[tool.flake8]
max-line-length = 88
Expand Down
56 changes: 56 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "python",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"include-v-in-tag": false,
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "chore",
"section": "Miscellaneous Chores"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "test",
"section": "Tests"
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration"
}
],
"draft": false,
"prerelease": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}