-
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.
feat: support for latest mainnet release
- Loading branch information
1 parent
3cb3f4d
commit 5b10207
Showing
35 changed files
with
16,747 additions
and
9,042 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,7 @@ | ||
# this file should contain environment variables specific to algokit localnet | ||
ALGOD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
ALGOD_SERVER=http://localhost | ||
ALGOD_PORT=4001 | ||
INDEXER_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
INDEXER_SERVER=http://localhost | ||
INDEXER_PORT=8980 |
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,63 @@ | ||
# .github/actions/setup-subtopia-registry/action.yaml | ||
name: "Setup Subtopia Registry" | ||
description: "Setup Subtopia Registry" | ||
inputs: | ||
ssh-key: | ||
description: "SSH Key" | ||
required: true | ||
repository: | ||
description: "Repository" | ||
required: true | ||
path: | ||
description: "Path" | ||
required: true | ||
node-version: | ||
description: "Node Version" | ||
required: true | ||
python-version: | ||
description: "Python Version" | ||
required: true | ||
poetry-version: | ||
description: "Poetry Version" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check out registry infra setup | ||
uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ inputs.ssh-key }} | ||
repository: ${{ inputs.repository }} | ||
path: ${{ inputs.path }} | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Set up Poetry | ||
shell: sh | ||
run: | | ||
pip install pipx | ||
pipx install poetry | ||
- name: Run AlgoKit LocalNet | ||
shell: sh | ||
run: | | ||
cd registry-infra | ||
pipx install algokit | ||
algokit localnet start | ||
- name: Setup localnet registry | ||
shell: sh | ||
env: | ||
LOCALNET_APP_IDS_PATH: ${{ github.workspace }}/.env | ||
CHAIN_TYPE: localnet | ||
run: | | ||
cp .env.template .env | ||
cd registry-infra | ||
poetry install --no-interaction | ||
cat ${{ github.workspace }}/.env | ||
poetry run python3 admin_scripts/deploy_localnet_infra.py | ||
cat ${{ github.workspace }}/.env |
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 was deleted.
Oops, something went wrong.
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,164 @@ | ||
name: CI / CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
merge_group: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
scope: "@subtopia-algo" | ||
cache: "npm" | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run build | ||
run: npm run build | ||
|
||
lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
scope: "@subtopia-algo" | ||
cache: "npm" | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint:scripts | ||
|
||
unit-tests: | ||
name: Integration tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18, 20] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Subtopia Registry | ||
uses: ./.github/actions/setup-subtopia-registry | ||
with: | ||
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} | ||
repository: subtopia-algo/subtopia-contracts | ||
path: ./registry-infra | ||
node-version: 18 | ||
python-version: ">=3.11 <3.12" | ||
poetry-version: 1.7.1 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
scope: "@subtopia-algo" | ||
cache: "npm" | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm run test:integration | ||
|
||
- name: "Upload coverage to Codecov" | ||
uses: codecov/codecov-action@v3 | ||
if: runner.os == 'Linux' && matrix.node == '18' | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
deploy-docs: | ||
if: github.ref == 'refs/heads/main' | ||
permissions: write-all | ||
name: Deploy docs | ||
needs: [build, lint, unit-tests] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
scope: "@subtopia-algo" | ||
cache: "npm" | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build docs | ||
run: npm run docs | ||
|
||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
commit-message: Refreshing documentation 🚀 | ||
folder: docs # The folder the action should deploy. | ||
|
||
release: | ||
if: github.ref == 'refs/heads/main' | ||
permissions: write-all | ||
name: Release | ||
needs: [build, lint, unit-tests, deploy-docs] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false # <--- override default gh token | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
scope: "@subtopia-algo" | ||
cache: "npm" | ||
cache-dependency-path: ./package-lock.json | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run build | ||
run: npm run build | ||
|
||
- name: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm run release |
Oops, something went wrong.