Skip to content

Commit

Permalink
Pushing a snapshot for 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantos Snapshoter committed Apr 25, 2024
1 parent d36735a commit 9d1b51e
Show file tree
Hide file tree
Showing 34 changed files with 2,082 additions and 1,334 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @markuslevonyak @danut13
.github/workflows @pantos-io/qa
.github/CODEOWNERS @pantos-io/management
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/ISSUE_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
projects: ["pantos-io/4"]
assignees:
- pantos-io/blockchain-backend
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: version
attributes:
label: Network
description: Which network can the issue be reproduced on?
options:
- Local
- Testnet
default: 0
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our Code of Conduct
options:
- label: I agree to follow this project's Code of Conduct
required: true
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature Request
description: You want a new feature to be implemented.
labels: [wishlisted]
projects: ["pantos-io/3"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting this. Please provide some details so we can have a better understanding of why you need this new feature.
- type: textarea
id: Requirements
attributes:
label: Requirements
description: |
Please add some details of what is needed, including use cases.
placeholder: ex. "I want my tokens to be... because..."
validations:
required: true

- type: textarea
id: Info
attributes:
label: "Notes & References"
description: |
Please add relevant notes, links other related issues/PRs,
anything to help diagnose, understand and develop the
feature you want.
19 changes: 19 additions & 0 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Install dependencies'
description: 'Install all required dependencies'
runs:
using: composite
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
shell: bash
run: python3 -m pip install -r requirements.txt

- uses: actions/cache@v3
with:
# with this we are going to cache the virtual environment
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
40 changes: 40 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
For Work In Progress Pull Requests, please use the Draft PR feature,
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
Before submitting a Pull Request, please ensure you've done the following:
- 👷‍♀️ Create small PRs. In most cases this will be possible.
- ✅ Provide tests for your changes.
- 📝 Use descriptive commit messages.
-->

## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [ ] Documentation Update

## Description

## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them
below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
For example having the text: "closes #1234" would connect the current pull
request to issue 1234. And when we merge the pull request, Github will
automatically close the issue.
-->

- Related Issue #
- Closes #

## QA Instructions

_Please replace this line with instructions on how to test your changes._


## [optional] Are there any post deployment tasks we need to perform?
75 changes: 75 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Format, Lint, and Test

on:
push:
branches:
- main
pull_request:

jobs:
Format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Format
run: make format-check

Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Lint
run: make lint

Sort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Sort
run: make sort-check

Bandit:
name: Bandit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Bandit
run: make bandit

StaticCodeAnalysis:
name: Static Code Analysis
runs-on: ubuntu-latest
needs: [Format, Lint, Sort, Bandit]
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: StaticCodeAnalysis
run: |
make check
UnitTest:
name: Unit Test
runs-on: ubuntu-latest
needs: [Format, Lint, Sort, Bandit]
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Unit Test
run: |
make coverage
114 changes: 114 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Release Workflow
run-name: ${{ (github.event.release.prerelease && 'Beta') || 'Prod'}} Release for ${{ github.repository }} - ${{ github.event.release.tag_name }}
on:
release:
# Triggered on Pre-Releases and Releases
types: [released, prereleased]

# Only allow one release at the time
concurrency:
group: deploy-${{ github.repository }}-release-${{ github.event.release.prerelease }}

jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.10
cache: 'pip'

- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
- name: Build package
run: |
source .venv/bin/activate
pip install build
python -m build
env:
PANTOS_COMMON_VERSION: ${{ github.event.release.tag_name }}

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: common
path: dist

add-assets:
name: Add Assets to the ${{ github.event.release.tag_name }} Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: common
path: dist

- name: List directory
run: |
cp dist/*.whl release/
- uses: sigstore/[email protected]
with:
inputs: release/*

- uses: actions/upload-artifact@v4
with:
name: signed-common
path: release/*.whl

- name: Upload release assets
uses: svenstaro/upload-release-action@v2
with:
file: "./release/*"
file_glob: true
overwrite: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}

- uses: robinraju/[email protected]
name: Download tarball
with:
tag: ${{ github.event.release.tag_name }}
tarBall: true
zipBall: true
fileName: '*'
out-file-path: external-release
preRelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}

- name: List directory
run: |
ls -lha external-release
# Remove all the files in external-release that are also present in release
for file in $(ls release); do
rm -f external-release/$file
done
- uses: sigstore/[email protected]
with:
inputs: external-release/*

- name: Upload signed source code
uses: ncipollo/release-action@v1
with:
artifacts: "./external-release/*"
artifactErrorsFailBuild: true
allowUpdates: true
tag: ${{ github.event.release.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
build/
dist/
find.sh
local/
.coverage
Loading

0 comments on commit 9d1b51e

Please sign in to comment.