Skip to content

chore: support dfx start --pocketic #538

chore: support dfx start --pocketic

chore: support dfx start --pocketic #538

Workflow file for this run

name: Run e2e tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
jobs:
test-extension:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, ubuntu-20.04 ]
extension: [ nns, sns ]
pocketic: [ "", "pocketic" ]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-e2e-${{ matrix.extension }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-e2e-${{ matrix.extension }}-
${{ runner.os }}-cargo-e2e-
- name: Install brew
uses: Homebrew/actions/setup-homebrew@master
if: contains(matrix.os, 'macos-12') == false
- name: Install sponge and timeout
run: brew install coreutils sponge
- name: Install cargo-dist
run: curl --proto '=https' --tlsv1.2 -LsSf https://axodotdev.artifacts.axodotdev.host/cargo-dist/v0.10.0/cargo-dist-installer.sh | sh
- name: Install IC SDK (dfx)
uses: dfinity/setup-dfx@main
with:
dfx-version: "0.24.1"
- name: Set prebuilt extensions directory
run: echo "PREBUILT_EXTENSIONS_DIR=$HOME/prebuilt-extensions" >> $GITHUB_ENV
- name: Build extension manually
run: .github/workflows/build-extension-manually.sh ${{ matrix.extension }}
- name: Build nns manually
run: .github/workflows/build-extension-manually.sh nns
if: matrix.extension == 'sns'
- name: run test
run: timeout 2400 e2e/bats/bin/bats extensions/${{ matrix.extension }}/e2e/tests/*.bash
env:
USE_POCKET_IC: ${{ matrix.pocketic }}
aggregate:
name: e2e:required
if: ${{ always() }}
needs: [test-extension]
runs-on: ubuntu-latest
steps:
- name: check e2e test result
if: ${{ needs.test-extension.result != 'success' }}
run: exit 1