From 9a192ce75fe30853baf1eccd0c6de577c5352b82 Mon Sep 17 00:00:00 2001 From: Oleksandr Anyshchenko Date: Sat, 8 Jul 2023 20:43:31 +0100 Subject: [PATCH] ci: slit up shell tests flow --- .github/workflows/cli.yml | 61 ++++++++++++++++++++------------------- scripts/simple.sh | 2 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1bbcf7f..3175d65 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -8,45 +8,46 @@ on: pull_request: jobs: - shell_tests: + install_simple: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Install aurora-cli (Advanced CLI) + uses: actions-rs/cargo@v1 + with: + command: install + args: --path . + + install_advanced: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Install aurora-cli (Advanced CLI) + uses: actions-rs/cargo@v1 + with: + command: install + args: --path . --no-default-features -F advanced + + simple_tests: name: Tests ${{ matrix.interface }} CLI runs-on: ubuntu-latest + needs: install_simple strategy: matrix: - interface: [ Advanced, Simple, Silo ] + interface: [ Simple, Silo ] include: - - interface: Advanced - args: --path . --no-default-features -F advanced - script: scripts/advanced.sh - interface: Simple - args: --path . script: scripts/simple.sh - interface: Silo - args: --path . script: scripts/simple-silo.sh steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Cargo Cache - uses: actions/cache@v1 - with: - path: ~/.cargo - key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} - ${{ runner.os }}-cargo - - name: Cargo Target Cache - uses: actions/cache@v1 - with: - path: target - key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }} - ${{ runner.os }}-cargo-target - - name: Install aurora-cli (Advanced CLI) - uses: actions-rs/cargo@v1 - with: - command: install - args: ${{ matrix.args }} - run: ${{ matrix.script }} + advanced_tests: + name: Tests Advanced CLI + runs-on: ubuntu-latest + needs: install_advanced + steps: + - run: scripts/advanced.sh diff --git a/scripts/simple.sh b/scripts/simple.sh index f95137b..f807015 100755 --- a/scripts/simple.sh +++ b/scripts/simple.sh @@ -147,7 +147,7 @@ curl -sL $ENGINE_LAST_WASM_URL -o $ENGINE_WASM_PATH || error_exit aurora-cli --engine $ENGINE_ACCOUNT stage-upgrade $ENGINE_WASM_PATH || error_exit sleep 2 aurora-cli --engine $ENGINE_ACCOUNT deploy-upgrade || error_exit -sleep 1 +sleep 2 version=$(aurora-cli --engine $ENGINE_ACCOUNT get-version || error_exit) assert_eq "$version" $AURORA_LAST_VERSION echo "$version"