From 26a83e7003483a81b12cd8b25c028b9d1d4efb72 Mon Sep 17 00:00:00 2001 From: Patricio Palladino Date: Sun, 27 Oct 2024 22:05:08 +0000 Subject: [PATCH] Run the v-next-ci workflow on chained PRs --- .github/workflows/v-next-ci.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/v-next-ci.yml b/.github/workflows/v-next-ci.yml index 38b0d09c3c..08131eb323 100644 --- a/.github/workflows/v-next-ci.yml +++ b/.github/workflows/v-next-ci.yml @@ -6,9 +6,6 @@ on: branches: - v-next pull_request: - # TODO: Remove the filter when v-next is merged into main - branches: - - v-next workflow_dispatch: concurrency: @@ -16,8 +13,28 @@ concurrency: cancel-in-progress: true jobs: + is-v-next: + runs-on: ubuntu-latest + outputs: + is_v_next: ${{ steps.check.outputs.folder_exists }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check if the folder v-next exists + id: check + run: | + if [ -d "./v-next" ]; then + echo "folder_exists=true" >> $GITHUB_OUTPUT + else + echo "folder_exists=false" >> $GITHUB_OUTPUT + fi + check_dependencies: name: Check dependency versions + needs: is-v-next + if: ${{ needs.is-v-next.outputs.is_v_next == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -29,6 +46,8 @@ jobs: check_npm_scripts: name: Check that the npm scripts are consistent + needs: is-v-next + if: ${{ needs.is-v-next.outputs.is_v_next == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -40,6 +59,8 @@ jobs: list-packages: name: List packages + needs: is-v-next + if: ${{ needs.is-v-next.outputs.is_v_next == 'true' }} runs-on: ubuntu-latest outputs: packages: ${{ steps.filter.outputs.changes }} @@ -91,7 +112,7 @@ jobs: strategy: fail-fast: false matrix: - package: ['hardhat'] + package: ["hardhat"] name: "[${{ matrix.package }}] bundle" runs-on: ubuntu-latest