feat: Refresh functional test repo #3
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
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: | |
jobs: | |
run-tests: | |
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 }} 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 }}/' 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)' |