This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4583b78
commit ba4b436
Showing
39 changed files
with
670 additions
and
25 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
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
2 changes: 1 addition & 1 deletion
2
tests_generated/test_deployment_language-typescript/.algokit.toml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[algokit] | ||
min_version = "v1.4.0" | ||
min_version = "v1.7.3" | ||
|
||
[deploy] | ||
command = "npm run deploy:ci" | ||
|
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
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
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
25 changes: 25 additions & 0 deletions
25
tests_generated/test_preset_name-production/.copier-answers.yml
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 @@ | ||
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY | ||
_commit: <commit> | ||
_src_path: <src> | ||
algod_port: 4001 | ||
algod_server: http://localhost | ||
algod_token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
author_email: None | ||
author_name: None | ||
contract_name: hello_world | ||
deployment_language: python | ||
ide_vscode: true | ||
indexer_port: 8980 | ||
indexer_server: http://localhost | ||
indexer_token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
preset_name: production | ||
project_name: test_preset_name-production | ||
python_linter: ruff | ||
use_dispenser: false | ||
use_github_actions: true | ||
use_pre_commit: true | ||
use_python_black: true | ||
use_python_mypy: true | ||
use_python_pip_audit: true | ||
use_python_pytest: true | ||
|
3 changes: 3 additions & 0 deletions
3
tests_generated/test_preset_name-production/.env.testnet.template
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 @@ | ||
# this file contains algorand network settings for interacting with testnet via algonode | ||
ALGOD_SERVER=https://testnet-api.algonode.cloud | ||
INDEXER_SERVER=https://testnet-idx.algonode.cloud |
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 @@ | ||
* text=auto eol=lf |
50 changes: 50 additions & 0 deletions
50
tests_generated/test_preset_name-production/.github/workflows/cd.yaml
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,50 @@ | ||
name: Continuous Delivery of Smart Contract | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: release | ||
|
||
jobs: | ||
ci-check: | ||
name: Perform Checks | ||
uses: ./.github/workflows/checks.yaml | ||
|
||
deploy-testnet: | ||
runs-on: 'ubuntu-latest' | ||
needs: ci-check | ||
environment: Test | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
|
||
- name: Install algokit | ||
run: pipx install algokit | ||
|
||
- name: Bootstrap dependencies | ||
run: algokit bootstrap all | ||
|
||
- 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: Deploy to testnet | ||
run: algokit deploy testnet | ||
env: | ||
# This is the account that becomes the creator of the contract. | ||
# Since we are not using the optional dispenser account (via DISPENSER_MNEMONIC), | ||
# it must also be funded with enough Algos to deploy and fund the smart contracts created | ||
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }} |
79 changes: 79 additions & 0 deletions
79
tests_generated/test_preset_name-production/.github/workflows/checks.yaml
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,79 @@ | ||
name: Check code base | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
checks: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
|
||
- name: Install algokit | ||
run: pipx install algokit | ||
|
||
- name: Start LocalNet | ||
run: algokit localnet start | ||
|
||
- name: Bootstrap dependencies | ||
run: algokit bootstrap all | ||
|
||
- 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: Audit with pip-audit | ||
run: | | ||
# audit non dev dependencies, no exclusions | ||
poetry export --without=dev > requirements.txt && poetry run pip-audit -r requirements.txt | ||
# audit all dependencies, with exclusions. | ||
# If a vulnerability is found in a dev dependency without an available fix, | ||
# it can be temporarily ignored by adding --ignore-vuln e.g. | ||
# --ignore-vuln "GHSA-hcpj-qp55-gfph" # GitPython vulnerability, dev only dependency | ||
poetry run pip-audit | ||
- 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: Check types with mypy | ||
run: poetry run mypy | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
set -o pipefail | ||
poetry run pytest --junitxml=pytest-junit.xml | ||
- name: Build smart contracts | ||
run: poetry run python -m smart_contracts build | ||
|
||
- name: Check output stability of the smart contracts | ||
shell: bash | ||
run: | | ||
# Add untracked files as empty so they come up in diff | ||
git add -N ./smart_contracts/artifacts | ||
# Error out if there are any changes in teal after generating output | ||
git diff --exit-code --minimal ./smart_contracts/artifacts || (echo "::error ::Smart contract artifacts have changed, ensure committed artifacts are up to date" && exit 1); | ||
- name: Run deployer against LocalNet | ||
run: poetry run python -m smart_contracts deploy |
8 changes: 8 additions & 0 deletions
8
tests_generated/test_preset_name-production/.github/workflows/pr.yaml
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,8 @@ | ||
name: Pull Request validation | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
pr-check: | ||
name: Perform Checks | ||
uses: ./.github/workflows/checks.yaml |
Oops, something went wrong.