From 06e640b79b68d72009b17fbe9085c6e9cb86d088 Mon Sep 17 00:00:00 2001 From: Thomas Chataigner Date: Fri, 21 Jun 2024 16:26:38 +0200 Subject: [PATCH] ci: solidity tests on all PR Signed-off-by: Thomas Chataigner --- .github/workflows/rust.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/solidity.yml | 40 ---------------------------------- 2 files changed, 36 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/solidity.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 971e0b75..525bac80 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -98,6 +98,42 @@ jobs: run: cargo xclippy -D warnings working-directory: ${{ github.workspace }}/${{ matrix.package }} + solidity-unit-tests: + runs-on: buildjet-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v4 + with: + repository: lurk-lab/ci-workflows + - uses: ./.github/actions/ci-env + - name: Setup CI + uses: ./.github/actions/setup + with: + pull_token: ${{ secrets.REPO_TOKEN }} + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Check formatting + run: | + forge fmt --check + working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ + + - name: Run Forge build + run: | + forge --version + forge build + working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ + + - name: Run Forge tests + run: | + forge test + working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ + cycle-count-regression: runs-on: warp-ubuntu-latest-x64-32x steps: diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml deleted file mode 100644 index 4213cd9c..00000000 --- a/.github/workflows/solidity.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Solidity - -on: - merge_group: - push: - branches: - - "main" - pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] - -jobs: - jobs: - unit-tests: - name: Unit Tests - runs-on: buildjet-16vcpu-ubuntu-2204 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Check formatting - run: | - forge fmt --check - working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ - - - name: Run Forge build - run: | - forge --version - forge build - working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ - - - name: Run Forge tests - run: | - forge test - working-directory: ${{ github.workspace }}/aptos/solidity/contracts/