From 4955bf9d5bdd1a302877932f879ebc5d9d6024da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Thu, 21 Dec 2023 10:18:51 +0000 Subject: [PATCH] need to separate yarn from nargo setup because foundry project doesnt have yarn --- .github/actions/setup-nargo/action.yml | 18 ++++++++++++++++++ .../actions/{setup => setup-yarn}/action.yml | 12 ------------ .github/workflows/vite_hardhat_nightly.yaml | 9 +++++++-- .github/workflows/with_foundry_nightly.yaml | 4 ++-- 4 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 .github/actions/setup-nargo/action.yml rename .github/actions/{setup => setup-yarn}/action.yml (64%) diff --git a/.github/actions/setup-nargo/action.yml b/.github/actions/setup-nargo/action.yml new file mode 100644 index 0000000..f5f5e28 --- /dev/null +++ b/.github/actions/setup-nargo/action.yml @@ -0,0 +1,18 @@ +name: Install Yarn dependencies +description: Installs the workspace's yarn dependencies and caches them +inputs: + version: + description: The version of the project to install dependencies for + required: true + +runs: + using: composite + steps: + - name: Install Nargo + uses: noir-lang/noirup@v0.1.2 + with: + toolchain: ${{ inputs.version }} + + - name: Use Nargo + run: nargo --version + shell: bash diff --git a/.github/actions/setup/action.yml b/.github/actions/setup-yarn/action.yml similarity index 64% rename from .github/actions/setup/action.yml rename to .github/actions/setup-yarn/action.yml index af53672..feb61d7 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup-yarn/action.yml @@ -4,9 +4,6 @@ inputs: project: description: The project to install dependencies for required: true - version: - description: The version of the project to install dependencies for - required: true runs: using: composite @@ -23,12 +20,3 @@ runs: - name: Install run: yarn --immutable shell: bash - - - name: Install Nargo - uses: noir-lang/noirup@v0.1.2 - with: - toolchain: ${{ inputs.version }} - - - name: Use Nargo - run: nargo --version - shell: bash diff --git a/.github/workflows/vite_hardhat_nightly.yaml b/.github/workflows/vite_hardhat_nightly.yaml index f773e5c..cbfc1df 100644 --- a/.github/workflows/vite_hardhat_nightly.yaml +++ b/.github/workflows/vite_hardhat_nightly.yaml @@ -46,8 +46,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up test environment - uses: ./.github/actions/setup + - name: Set up yarn + uses: ./.github/actions/setup-yarn + with: + project: vite-hardhat + + - name: Set up nargo + uses: ./.github/actions/setup-nargo with: version: ${{ matrix.version }} diff --git a/.github/workflows/with_foundry_nightly.yaml b/.github/workflows/with_foundry_nightly.yaml index 2027ce1..2d5c148 100644 --- a/.github/workflows/with_foundry_nightly.yaml +++ b/.github/workflows/with_foundry_nightly.yaml @@ -46,8 +46,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up test environment - uses: ./.github/actions/setup + - name: Set up nargo + uses: ./.github/actions/setup-nargo with: version: ${{ matrix.version }}