-
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.
chore(pipelines): first version, with main, pr and release
- Loading branch information
Showing
7 changed files
with
428 additions
and
0 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,36 @@ | ||
--- | ||
name: Bug fix | ||
about: Describe the bug to be fixed | ||
title: 'fix: <title for the bug>' | ||
labels: fix | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Don't forget to assign:** | ||
* Project | ||
* Milestone (if any) | ||
|
||
**Environment:** dev|prod | ||
|
||
## Actual Behaviour | ||
A clear and concise description of what the bug is. | ||
|
||
## Expected behaviour | ||
A clear and concise description of what you expected to happen. | ||
|
||
## Steps To Reproduce | ||
An ordered list of the steps to reproduce the bug | ||
|
||
## Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
## Dependencies | ||
Links to other tasks that may depend or be dependent of this one. | ||
|
||
## Additional context | ||
* Browser being used | ||
* Info used to reproduce | ||
* Credentials or userid | ||
* Logs | ||
* Links |
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 @@ | ||
--- | ||
name: Chore | ||
about: Describe what needs to be changed | ||
title: 'chore: <title of the task>' | ||
labels: chore | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Don't forget to assign:** | ||
* Project | ||
* Milestone (if any) | ||
|
||
## Description | ||
A clear and concise description of the purpose of this task. | ||
|
||
## Additional context | ||
* Helpful documentation | ||
* Links |
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,27 @@ | ||
--- | ||
name: Feature | ||
about: Describe the task derived from a business request | ||
title: 'feat: <title>' | ||
labels: feat | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Don't forget to assign:** | ||
* Project | ||
* Milestone (if any) | ||
|
||
## Description of the feature | ||
* A clear and concise description of the business idea | ||
* Helpful documentation | ||
Acceptance criteria (if applicable) | ||
Given [context] | ||
When [a specific action is performed] | ||
Then [a set of consequences should occur] | ||
|
||
## Dependencies | ||
Links to other tasks that may depend or be dependent on this one. | ||
|
||
## Additional context | ||
* Link to the notion, if any | ||
* Screenshots for the UI |
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,5 @@ | ||
# To allow validation of only one commit, usually the one that defines the title | ||
# I think that is achieved with these options set to true. | ||
# https://github.com/Ezard/semantic-prs#configuration-options | ||
titleOnly: true | ||
allowRevertCommits: 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,78 @@ | ||
name: Merge Main | ||
|
||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
|
||
|
||
jobs: | ||
prepare: | ||
name: Calculate Version and Build Number | ||
runs-on: ubuntu-22.04 | ||
|
||
outputs: | ||
build_number: ${{ steps.build_number.outputs.value }} | ||
new_release: ${{ steps.semantic.outputs.new_release_published }} | ||
release: ${{ steps.semantic.outputs.new_release_version }} | ||
release_notes: ${{ steps.semantic.outputs.new_release_notes }} | ||
version: ${{ steps.version.outputs.value }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- uses: cycjimmy/semantic-release-action@v3 | ||
id: semantic | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
with: | ||
dry_run: true | ||
|
||
- name: Count number or releases for tag | ||
id: build_number | ||
run: echo "value=$(($(git tag | grep -c ${{ steps.semantic.outputs.new_release_version }}) + 1))" >> $GITHUB_OUTPUT | ||
|
||
- name: Compute version | ||
id: version | ||
run: echo "value=${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT | ||
|
||
|
||
releases: | ||
if: needs.prepare.outputs.new_release == 'true' | ||
|
||
name: Generates Prerelease | ||
runs-on: ubuntu-22.04 | ||
|
||
needs: | ||
- prepare | ||
|
||
steps: | ||
- name: Create Pre Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.prepare.outputs.version }} | ||
release_name: ${{ needs.prepare.outputs.version }} | ||
body: ${{ github.event.head_commit.message }} | ||
prerelease: true | ||
|
||
- name: Delete Previous drafts | ||
uses: hugo19941994/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- name: Create Draft Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.prepare.outputs.release }} | ||
release_name: ${{ needs.prepare.outputs.release }} | ||
body: ${{ needs.prepare.outputs.release_notes }} | ||
draft: 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,129 @@ | ||
name: Pull Request | ||
|
||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
|
||
|
||
jobs: | ||
validate: | ||
if: github.actor != 'renovate[bot]' | ||
name: Validate | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configurating Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Azory YData Bot" | ||
git config core.autocrlf false | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache pip dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-all | ||
- name: Validate code formatting | ||
run: make lint | ||
|
||
- name: Commit code formatting changes | ||
if: always() | ||
id: commit | ||
run: | | ||
if [[ `git status --porcelain --untracked-files=no` ]]; then | ||
echo "CHANGES=true" >> $GITHUB_OUTPUT | ||
git add -u | ||
git commit -m "[skip ci] Code formatting" -a | ||
else | ||
echo "CHANGES=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
if: always() && steps.commit.outputs.CHANGES == 'true' | ||
with: | ||
branch: ${{ github.head_ref }} | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
validate-docs: | ||
name: Validate Docs | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache pip dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-doc | ||
- name: Build docs | ||
run: | | ||
mkdocs build | ||
test: | ||
name: Test | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache pip dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-test | ||
- name: Unit Tests | ||
run: | | ||
make test | ||
- name: Coverage Tests | ||
run: | | ||
make test-cov |
Oops, something went wrong.