From f38a93e29ecc7d4a688b120578125e068f87dda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Mon, 18 Dec 2023 17:18:42 +0000 Subject: [PATCH] wip --- .github/actions/setup/action.yml | 34 +++++++++++++++++++ .github/workflows/nightly.yaml | 51 +++++++++++++++++++++++++++++ .github/workflows/vite_hardhat.yaml | 7 ++-- 3 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/nightly.yaml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..04df6ed --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,34 @@ +name: Install Yarn dependencies +description: Installs the workspace's yarn dependencies and caches them +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 + steps: + - name: Enable Corepack before setting up Node + run: corepack enable + shell: bash + + - uses: actions/setup-node@v4 + with: + node-version-file: '${{ inputs.project }}/package.json' + cache: 'yarn' + + - name: Install + run: yarn --immutable + shell: bash + + - name: Install Nargo + uses: noir-lang/noirup@v0.1.2 + with: + toolchain: ${{ inputs.version == 'latest' && 'stable' || inputs.version }} + + - name: Use Nargo + run: nargo --version + shell: bash diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml new file mode 100644 index 0000000..e502d86 --- /dev/null +++ b/.github/workflows/nightly.yaml @@ -0,0 +1,51 @@ +name: Nightly drift test +on: + push: + paths: + - 'vite-hardhat/**' +# pull_request: +# paths: +# - 'vite-hardhat/**' + +jobs: + test-drift-vite-hardhat: + runs-on: ubuntu-latest + defaults: + run: + working-directory: vite-hardhat + strategy: + matrix: + version: ['latest'] + steps: + - uses: actions/checkout@v4 + + - name: Set up test environment + uses: ./.github/actions/setup + with: + project: vite-hardhat + version: ${{ matrix.version }} + + - name: Generate verifier contract + run: | + nargo codegen-verifier + working-directory: vite-hardhat/circuits + + - name: Install test version + run: | + yarn add \ + @noir-lang/noir_js@${{ matrix.version }} \ + @noir-lang/backend_barretenberg@${{ matrix.version }} \ + @noir-lang/noir_wasm@${{ matrix.version }} \ + @noir-lang/source-resolver@${{ matrix.version }} \ + @noir-lang/types@${{ matrix.version }} + + - name: 'Create env file' + run: | + touch .env + echo SEPOLIA_ALCHEMY_KEY="${{ secrets.SEPOLIA_ALCHEMY_KEY }}" >> .env + echo SEPOLIA_DEPLOYER_PRIVATE_KEY="${{ secrets.SEPOLIA_DEPLOYER_PRIVATE_KEY }}" >> .env + echo MUMBAI_ALCHEMY_KEY"=${{ secrets.MUMBAI_ALCHEMY_KEY }}" >> .env + echo MUMBAI_DEPLOYER_PRIVATE_KEY="${{ secrets.MUMBAI_DEPLOYER_PRIVATE_KEY }}" >> .env + + - name: Run test + run: yarn test diff --git a/.github/workflows/vite_hardhat.yaml b/.github/workflows/vite_hardhat.yaml index 701800b..5e2d19b 100644 --- a/.github/workflows/vite_hardhat.yaml +++ b/.github/workflows/vite_hardhat.yaml @@ -1,9 +1,8 @@ name: PR - vite-hardhat on: - push: -# pull_request: -# paths: -# - 'vite-hardhat/**' + pull_request: + paths: + - 'vite-hardhat/**' jobs: test-vite-hardhat: