-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Refresh functional test repo #21
Open
janniks
wants to merge
22
commits into
master
Choose a base branch
from
08-01-feat_refresh_functional_test_repo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
27c0c52
feat: Refresh functional test repo
janniks 679804c
chore: try compose cache
janniks 84f04ae
chore: disable fautly cache
janniks 7ffe5eb
chore: update accounts
janniks 49d157c
chore: format
janniks 6366a6c
chore: update test
janniks 3380240
chore: more timeout
janniks 1d8d182
ci: trigger
janniks 2f4295d
chore: update
janniks 47325b4
chore: update sha parse
janniks d3094ed
chore: push updates
janniks be669f3
chore: add timeouts
janniks c7707b1
ci: run all tests
janniks 8147345
chore: update test
janniks e3522a9
ci: trigger
janniks 750c42d
chore: try jude multi miner
janniks 7c6029c
chore: add more multi
janniks 154805c
fix: branch
janniks 189739e
chore: wip
janniks 0e3fb49
chore: wip
janniks 1825e8e
chore: all current regtest tests pass
janniks 4dccb3e
fix: wip tests
janniks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,119 @@ | ||
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-regtest-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Cache regtest-env | ||
uses: actions/cache@v3 | ||
id: cache-regtest-env | ||
with: | ||
path: /tmp/regtest-env | ||
key: ${{ runner.os }}-regtest-env | ||
|
||
- name: Determine core commit SHA | ||
id: core-commit | ||
run: | | ||
core_commit=${{ github.event.inputs.core_commit || 'feat/more-multi-miner-fixes-jude' }} | ||
if git ls-remote --exit-code --heads https://github.com/stacks-network/stacks-core.git $core_commit; then | ||
core_commit_sha=$(git ls-remote https://github.com/stacks-network/stacks-core.git $core_commit | awk '{print $1}') | ||
elif git ls-remote --exit-code --refs https://github.com/stacks-network/stacks-core.git $core_commit; then | ||
core_commit_sha=$core_commit | ||
else | ||
echo "Invalid core_commit: $core_commit" | ||
exit 1 | ||
fi | ||
echo "::set-output name=sha::$core_commit_sha" | ||
|
||
- name: Clone regtest-env | ||
run: | | ||
if [ ! -d "/tmp/regtest-env" ]; then | ||
git clone https://github.com/hirosystems/stacks-regtest-env.git /tmp/regtest-env | ||
fi | ||
cd /tmp/regtest-env | ||
git fetch origin | ||
git checkout ${{ github.event.inputs.regtest_env_commit || 'feat/signer' }} | ||
git pull origin ${{ github.event.inputs.regtest_env_commit || 'feat/signer' }} | ||
|
||
- name: Prepare regtest-env | ||
run: | | ||
cd /tmp/regtest-env | ||
sed -i 's/\(&STACKS_BLOCKCHAIN_COMMIT \).*/\1${{ steps.core-commit.outputs.sha }}/' docker-compose.yml | ||
sed -i 's/\(&MINE_INTERVAL_EPOCH25 \).*/\12s/' docker-compose.yml | ||
sed -i 's/\(&MINE_INTERVAL_EPOCH3 \).*/\16s/' docker-compose.yml | ||
sed -i 's/\(&&NAKAMOTO_BLOCK_INTERVAL \).*/\14s/' docker-compose.yml | ||
docker compose build | ||
cat << EOF >> stacks-krypton-miner.toml | ||
# DEVNET WALLETS | ||
[[ustx_balance]] | ||
address = "ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5" | ||
amount = 10000000000000000 | ||
# secretKey = 7287ba251d44a4d3fd9276c88ce34c5c52a038955511cccaf77e61068649c17801 | ||
[[ustx_balance]] | ||
address = "ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG" | ||
amount = 10000000000000000 | ||
# secretKey = 530d9f61984c888536871c6573073bdfc0058896dc1adfe9a6a10dfacadc209101 | ||
[[ustx_balance]] | ||
address = "ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC" | ||
amount = 10000000000000000 | ||
# secretKey = d655b2523bcd65e34889725c73064feb17ceb796831c0e111ba1a552b0f31b3901 | ||
[[ustx_balance]] | ||
address = "ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND" | ||
amount = 10000000000000000 | ||
# secretKey = f9d7206a47f14d2870c163ebab4bf3e70d18f5d14ce1031f3902fbbc894fe4c701 | ||
[[ustx_balance]] | ||
address = "ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB" | ||
amount = 10000000000000000 | ||
# secretKey = 3eccc5dac8056590432db6a35d52b9896876a3d5cbdea53b72400bc9c2099fe801 | ||
[[ustx_balance]] | ||
address = "ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0" | ||
amount = 10000000000000000 | ||
# secretKey = 7036b29cb5e235e5fd9b09ae3e8eec4404e44906814d5d01cbca968a60ed4bfb01 | ||
[[ustx_balance]] | ||
address = "ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ" | ||
amount = 10000000000000000 | ||
# secretKey = b463f0df6c05d2f156393eee73f8016c5372caa0e9e29a901bb7171d90dc4f1401 | ||
EOF | ||
|
||
# - name: Build regtest-env | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: /tmp/regtest-env | ||
# push: false | ||
# tags: hirosystems/stacks-regtest-env:latest | ||
# cache-from: type=gha | ||
# cache-to: type=gha,mode=max | ||
|
||
- name: Run regtest tests | ||
run: npx jest --runInBand -t 'regtest-env pox-4' | ||
env: | ||
NETWORK_UP_CMD: cd /tmp/regtest-env && docker compose down --volumes --remove-orphans --timeout=1 --rmi=all && docker compose up --build -d | ||
NETWORK_DOWN_CMD: cd /tmp/regtest-env && docker compose down --volumes --remove-orphans --timeout=1 |
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 |
---|---|---|
|
@@ -43,3 +43,7 @@ dist/**/* | |
yarn.lock | ||
.vercel | ||
.git-info | ||
|
||
|
||
# clarinet | ||
.cache |
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,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 |
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 @@ | ||
--- | ||
id: 0 | ||
name: Devnet deployment | ||
network: devnet | ||
stacks-node: "http://localhost:20443" | ||
bitcoin-node: "http://devnet:devnet@localhost:18443" | ||
plan: | ||
batches: [] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯