update-2 #5
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: TypeScript Integration Tests | |
on: | |
pull_request: | |
merge_group: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
GITHUB_ACTIONS: true | |
APTOS_NETWORK: local | |
UPGRADE_CONTRACTS: false | |
ARTIFACTS_LEVEL: all | |
DEFAULT_FUND_AMOUNT: 40000000 | |
jobs: | |
typescript-integration-tests: | |
name: Run Typescript Integration Tests | |
runs-on: Larger-Github-Runners | |
timeout-minutes: 60 | |
env: | |
DEFAULT_FUNDER_PRIVATE_KEY: ${{ secrets.GH_DEFAULT_FUNDER_PRIVATE_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libudev-dev lld libdw-dev | |
- name: Install Aptos CLI | |
run: | | |
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3 | |
aptos --version # Verify that Aptos CLI is installed | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install npm dependencies | |
run: pnpm install | |
working-directory: test-suites | |
- name: Run Aptos Create Local Testnet | |
run: | | |
make local-testnet & | |
echo $! > aptos_serve_pid.txt | |
- name: Wait for Aptos Local Testnet to be ready | |
run: | | |
sleep 20 | |
- name: Set Local Aptos Workspace Config | |
run: make set-workspace-config | |
- name: Init Local Aptos Workspace Config | |
run: make init-workspace-config | |
- name: Run Aptos Create Profiles | |
run: make init-profiles | |
- name: Run Aptos Create Test Profiles | |
run: make init-test-profiles | |
- name: Run Aptos Fund Profiles | |
run: make fund-profiles | |
- name: Run Aptos Fund Test Profiles | |
run: make fund-test-profiles | |
- name: Run Aptos Compile All Contracts | |
run: make compile-all | |
- name: Run Aptos Publish All Contracts | |
run: make publish-all | |
# - name: Run init test data | |
# run: pnpm run deploy:init-data | |
# working-directory: test-suites | |
# - name: Run integration tests logic | |
# run: pnpm run test:logic | |
# working-directory: test-suites | |
- name: Terminate Aptos Local Testnet | |
if: always() | |
run: |- | |
kill $(cat aptos_serve_pid.txt) || true |