Skip to content

Commit

Permalink
chore: testing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Nov 17, 2023
1 parent 99e0389 commit 5c1f401
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 32 deletions.
56 changes: 56 additions & 0 deletions .github/actions/setup-subtopia-registry/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# .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: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
scope: "@subtopia-algo"
cache: "npm"
cache-dependency-path: ./package-lock.json

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ inputs.poetry-version }}

- name: Run AlgoKit LocalNet
run: |
cd registry-infra
poetry run pipx install algokit
algokit localnet start
38 changes: 6 additions & 32 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ jobs:
with:
fetch-depth: 1

- name: Check out registry infra setup
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
repository: subtopia-algo/subtopia-contracts
path: ./registry-infra
fetch-depth: 1

- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -40,34 +32,16 @@ jobs:
cache: "npm"
cache-dependency-path: ./package-lock.json

- name: Set up Python
uses: actions/setup-python@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

- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.7.1

- name: Run AlgoKit LocalNet
run: |
cd registry-infra
poetry run pipx install algokit
algokit localnet start
- name: Setup localnet registry
env:
LOCALNET_APP_IDS_PATH: ${{ github.workspace }}/.env
CHAIN_TYPE: localnet
run: |
cp .env.template .env
cd registry-infra
poetry install
cat ${{ github.workspace }}/.env
poetry run python3 admin_scripts/deploy_localnet_infra.py
cat ${{ github.workspace }}/.env
- name: Install dependencies
run: npm ci

Expand Down

0 comments on commit 5c1f401

Please sign in to comment.