Skip to content

Commit

Permalink
feat: standalone react starter template (#3)
Browse files Browse the repository at this point in the history
* feat: initial draft for templatized version of the react dapp

* refactor: adding tests_generated

* refactor: addressing pr comments

* refactor: addressing pr comments

* chore: testing ci

* chore: testing ci

* chore: addressing pr comments
  • Loading branch information
aorumbayev authored Jun 14, 2023
1 parent cc04cbd commit 9012e3f
Show file tree
Hide file tree
Showing 132 changed files with 7,270 additions and 692 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ indent_size = 2
tab_width = 2
max_line_length = 140
trim_trailing_whitespace = true
single_quote = true
6 changes: 0 additions & 6 deletions .env.development.template

This file was deleted.

6 changes: 0 additions & 6 deletions .env.local.template

This file was deleted.

6 changes: 0 additions & 6 deletions .env.production.template

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=lf
37 changes: 37 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Continuous Delivery of Template

on:
push:
branches:
- main

concurrency: release

jobs:
ci-check-python:
name: Check Python
uses: ./.github/workflows/check-python.yaml

tag-release:
runs-on: 'ubuntu-latest'
needs: ci-check-python
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Tag release
id: tag
uses: TriPSs/[email protected]
with:
skip-commit: 'true'
tag-prefix: ''
skip-on-empty: 'false'

- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ steps.tag.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
body: ${{ steps.tag.outputs.clean_changelog }}
56 changes: 56 additions & 0 deletions .github/workflows/check-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Check Template

on:
workflow_call:

jobs:
check-python:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Install algokit
run: pipx install algokit

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

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Check formatting with Black
run: |
# stop the build if there are files that don't meet formatting requirements
poetry run black --check .
- name: Check linting with Ruff
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run ruff .
- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Run tests
shell: bash
run: |
set -o pipefail
poetry run pytest --junitxml=pytest-junit.xml
- name: Check generated templates have been reviewed
shell: bash
run: |
# Add untracked files as empty so they come up in diff
git add -N ./tests_generated
# Look for changes in generated templates and error if there are any
git diff --exit-code --minimal ./tests_generated ':(exclude)package-lock.json'
12 changes: 12 additions & 0 deletions .github/workflows/issue_closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Solve zendesk ticket when the issue is closed
on:
issues:
types: [closed]
jobs:
issue_closed:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_closed.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/issue_commented.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Add comment to zendesk ticket on GitHub issue commented
on:
issue_comment:
types: [created]
jobs:
issue_closed:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_commented.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/issue_labelled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Create Zendesk ticket when an issue is labelled with makerx
on:
issues:
types: [labeled]
jobs:
issue_created:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_labelled.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Pull Request validation

on: [pull_request]

jobs:
pr-check:
name: Check Python
uses: ./.github/workflows/check-python.yaml
11 changes: 11 additions & 0 deletions .github/workflows/zendesk_github_add_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Add comment to GitHub issue on Zendesk ticket commented
on:
repository_dispatch:
types:
- zendesk_github_add_comment
permissions:
issues: write
jobs:
add-comment:
name: Add comment to issue
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_add_comment.yml@main
11 changes: 11 additions & 0 deletions .github/workflows/zendesk_github_close_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Close GitHub issue on Zendesk ticket solved
on:
repository_dispatch:
types:
- zendesk_github_close_issue
permissions:
issues: write
jobs:
close_issue:
name: Close GitHub issue
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_close_issue.yml@main
179 changes: 159 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,169 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# dependencies
/node_modules
/.pnp
.pnp.js
# C extensions
*.so

# testing
/coverage
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# production
/build
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# dotenv environment variable files
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.env.*
!.env.*.template
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Ruff (linter)
.ruff_cache/

# Cython debug symbols
cython_debug/

# PyCharm
.idea/
!.idea/runConfigurations

# misc
/dist
# macOS
.DS_Store

# Received approval test files
*.received.*

npm-debug.log*
yarn-debug.log*
yarn-error.log*
/test-results/
/playwright-report/
/playwright/.cache/
# NPM
node_modules
Loading

0 comments on commit 9012e3f

Please sign in to comment.