Skip to content

Commit

Permalink
fix conditions for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
BuddyGlas committed Jul 9, 2024
1 parent d5e2be8 commit 6e372dd
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/collator-selection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
yarn add mochawesome
Expand All @@ -151,7 +151,7 @@ jobs:

- name: Run tests
working-directory: js-packages/tests
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/forkless-update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
../scripts/wait_for_first_block.sh
Expand All @@ -153,7 +153,7 @@ jobs:
- name: "Reconcile: runtime is upgraded"
working-directory: js-packages/tests
id: reconcile1
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
echo "Executing upgrade"
yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.network }}-runtime/${{ matrix.network }}_runtime.compact.compressed.wasm
Expand All @@ -163,7 +163,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive2
if: steps.reconcile1.outcome == 'success'
if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
run: |
yarn
../scripts/wait_for_first_block.sh
Expand All @@ -172,7 +172,7 @@ jobs:

- name: Run Parallel tests after forkless upgrade
working-directory: js-packages/tests
if: steps.alive2.outcome == 'success'
if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
Expand All @@ -181,7 +181,7 @@ jobs:

- name: Run Sequential tests after forkless upgrade
working-directory: js-packages/tests
if: steps.alive2.outcome == 'success'
if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
run: |
NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/forkless-update-nodata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
yarn add mochawesome
Expand All @@ -168,7 +168,7 @@ jobs:
- name: "Reconcile: runtime is upgraded"
working-directory: js-packages/tests
id: reconcile1
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
echo "Executing upgrade"
yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm ../scripts/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.network }}-runtime/${{ matrix.network }}_runtime.compact.compressed.wasm
Expand All @@ -178,15 +178,15 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive2
if: steps.reconcile1.outcome == 'success'
if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
run: |
../scripts/wait_for_first_block.sh
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Parallel tests after forkless upgrade
working-directory: js-packages/tests
if: steps.alive2.outcome == 'success'
if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
Expand All @@ -195,7 +195,7 @@ jobs:

- name: Run Sequential tests after forkless upgrade
working-directory: js-packages/tests
if: steps.alive2.outcome == 'success'
if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/node-only-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
yarn add mochawesome
Expand All @@ -169,22 +169,22 @@ jobs:

- name: Run Parallel tests before Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Sequential tests before Node Parachain upgrade
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: "Reconcile: only one old node"
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
id: reconcile1
uses: UniqueNetwork/baedeker-action/reconcile@v1-no-debug-output
with:
Expand All @@ -198,14 +198,14 @@ jobs:
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
id: alive2
if: steps.reconcile1.outcome == 'success'
if: ${{ !cancelled() && steps.reconcile1.outcome == 'success' }}
run: |
../scripts/wait_for_first_block.sh
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: "Reconcile: all nodes are updated"
if: steps.alive2.outcome == 'success'
if: ${{ !cancelled() && steps.alive2.outcome == 'success' }}
id: reconcile2
uses: UniqueNetwork/baedeker-action/reconcile@v1-no-debug-output
with:
Expand All @@ -218,23 +218,23 @@ jobs:
- name: Ensure network is alive
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
id: alive3
if: steps.reconcile2.outcome == 'success'
if: ${{ !cancelled() && steps.reconcile2.outcome == 'success' }}
run: |
../scripts/wait_for_first_block.sh
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Parallel tests after Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
if: steps.alive3.outcome == 'success'
if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}

- name: Run Sequential tests after Node Parachain upgrade
if: steps.alive3.outcome == 'success'
if: ${{ !cancelled() && steps.alive3.outcome == 'success' }}
working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/xcm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
yarn add mochawesome
Expand All @@ -227,14 +227,14 @@ jobs:
- name: Call HRMP initialization
working-directory: js-packages/scripts
id: hrmp
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
yarn node --no-warnings=ExperimentalWarning --loader ts-node/esm createHrmp.ts ${{matrix.network}}
- name: Run XCM tests
working-directory: js-packages/tests
id: tests
if: steps.hrmp.outcome == 'success'
if: ${{ !cancelled() && steps.hrmp.outcome == 'success' }}
run: |
echo "Ready to start tests"
NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/xnft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Ensure network is alive
working-directory: js-packages/tests
id: alive1
if: steps.bdk.outcome == 'success'
if: ${{ !cancelled() && steps.bdk.outcome == 'success' }}
run: |
yarn
yarn add mochawesome
Expand All @@ -165,7 +165,7 @@ jobs:
- name: Run XNFT Tests
working-directory: xnft-tests
if: steps.alive1.outcome == 'success'
if: ${{ !cancelled() && steps.alive1.outcome == 'success' }}
run: |
NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
Expand Down

0 comments on commit 6e372dd

Please sign in to comment.