Skip to content

Commit

Permalink
feat: Refresh functional test repo
Browse files Browse the repository at this point in the history
  • Loading branch information
janniks committed Aug 1, 2024
1 parent 733fde8 commit 71dcda1
Show file tree
Hide file tree
Showing 15 changed files with 736 additions and 485 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/run-regtest-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: run-regtest-tests

on:
workflow_dispatch:
inputs:
core_commit:
description: 'regtest-env config `STACKS_BLOCKCHAIN_COMMIT` (defaults to `develop`)'
required: false
default: 'develop'
type: string
regtest_env_commit:
description: 'regtest-env commit (defaults to `feat/signer`)'
required: false
default: 'feat/signer'
type: string
pull_request:

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} + ${{ github.event.inputs.core_commit }} + ${{ github.event.inputs.regtest_env_commit }}'
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- uses: docker/setup-buildx-action@v3
- uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Install dependencies
run: npm ci

- name: Clone regtest-env
run: |
git clone -b ${{ github.event.inputs.regtest_env_commit || 'feat/signer' }} https://github.com/hirosystems/stacks-regtest-env.git
- name: Prepare regtest-env
run: |
cd stacks-regtest-env
sed -i 's/\(&STACKS_BLOCKCHAIN_COMMIT \).*/\1${{ github.event.inputs.core_commit || 'develop' }}/' docker-compose.yml
sed -i 's/\(&MINE_INTERVAL_EPOCH25 \).*/\12s/' docker-compose.yml
sed -i 's/\(&MINE_INTERVAL_EPOCH3 \).*/\17s/' docker-compose.yml
sed -i 's/\(&&NAKAMOTO_BLOCK_INTERVAL \).*/\13s/' docker-compose.yml
docker compose build
- name: Run regtest tests
run: npx jest --runInBand --testNamePattern='stack-stx (in reward-phase)'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ dist/**/*
yarn.lock
.vercel
.git-info


# clarinet
.cache
21 changes: 21 additions & 0 deletions Clarinet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
name = "devnet"
description = ""
authors = []
telemetry = false
cache_dir = "./.cache"

# [contracts.counter]
# path = "contracts/counter.clar"

[repl.analysis]
passes = ["check_checker"]
check_checker = { trusted_sender = false, trusted_caller = false, callee_filter = false }

# Check-checker settings:
# trusted_sender: if true, inputs are trusted after tx_sender has been checked.
# trusted_caller: if true, inputs are trusted after contract-caller has been checked.
# callee_filter: if true, untrusted data may be passed into a private function without a
# warning, if it gets checked inside. This check will also propagate up to the
# caller.
# More informations: https://www.hiro.so/blog/new-safety-checks-in-clarinet
8 changes: 8 additions & 0 deletions deployments/default.devnet-plan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
id: 0
name: Devnet deployment
network: devnet
stacks-node: "http://localhost:20443"
bitcoin-node: "http://devnet:devnet@localhost:18443"
plan:
batches: []
Loading

0 comments on commit 71dcda1

Please sign in to comment.