-
-
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.
refactor: add CI/CD. lint with flake8/black
- Loading branch information
Showing
64 changed files
with
8,153 additions
and
302 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# http://editorconfig.org | ||
# Source: pydanny cookiecutter-django repo | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{py,rst,ini}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
# Contributing | ||
|
||
The repository is released under the MIT license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into master. |
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,17 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Workflow** | ||
If applicable, provide a workflow file to help explain your problem. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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 @@ | ||
blank_issues_enabled: false |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,19 @@ | ||
# PUll Request Template | ||
|
||
## Type of Change | ||
|
||
<!-- What type of change does your code introduce? --> | ||
- [ ] New feature | ||
- [ ] Bug fix | ||
- [ ] Documentation | ||
- [ ] Refactor | ||
- [ ] Chore | ||
|
||
## Resolves | ||
|
||
- Fixes #[Add issue number here.] | ||
|
||
## Describe Changes | ||
|
||
<!-- Describe your changes in detail, if applicable. --> | ||
_Describe what this Pull Request does_ |
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,25 @@ | ||
name: Check Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-pull-request: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
branch: main | ||
extra_plugins: | | ||
@semantic-release/git | ||
@semantic-release/changelog | ||
dry_run: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} |
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,39 @@ | ||
#------------------------------------------------------------------------------ | ||
# Lawrence McDaniel - https://lawrencemcdaniel.com | ||
# Version Bump Workflow | ||
# | ||
# Used mostly to propagate Dependabot pushed to main to the next branch. Use | ||
# cases: | ||
# - Dependabot pushes to main | ||
# - Manual push to main | ||
# - back propagation of modifications to __version__.py | ||
#------------------------------------------------------------------------------ | ||
name: Merge main into next | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Merge main into next | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git checkout main | ||
git pull | ||
git checkout next | ||
git merge main | ||
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git HEAD:next | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} |
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,69 @@ | ||
#--------------------------------------------------------- | ||
# - Create a semantical release | ||
# - Set latest tag | ||
#--------------------------------------------------------- | ||
name: Create a new release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# required antecedent | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.9.0' | ||
|
||
- name: Install npm dev dependencies | ||
run: npm install --only=dev | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
id: semantic | ||
with: | ||
branches: | | ||
[ | ||
'+([0-9])?(.{+([0-9]),x}).x', | ||
'main', | ||
'next', | ||
'next-major', | ||
{ | ||
name: 'beta', | ||
prerelease: true | ||
}, | ||
{ | ||
name: 'alpha', | ||
prerelease: true | ||
} | ||
] | ||
extra_plugins: | | ||
@semantic-release/git | ||
@semantic-release/changelog | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
GIT_COMMITTER_NAME: github-actions[bot] | ||
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com | ||
GIT_AUTHOR_NAME: github-actions[bot] | ||
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com | ||
|
||
- name: Publish To GitHub Package Registry | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: echo "new release was published" | ||
shell: bash | ||
|
||
- name: Push updates to branch for major version | ||
if: steps.semantic.outputs.new_release_published == 'true' | ||
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} |
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,33 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
tests: | ||
name: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r ./requirements/local.txt | ||
- name: secure_logger Unit tests | ||
run: | | ||
export PYTHONPATH=$PYTHONPATH:$(pwd) | ||
python -m unittest discover -s secure_logger/tests/ | ||
- name: setup.py tests | ||
run: | | ||
export PYTHONPATH=$PYTHONPATH:$(pwd) | ||
python -m unittest setup_test |
Oops, something went wrong.