From e1a9eb052d83246f9fec3f85a92a6a819bbe9bb8 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Thu, 16 Mar 2023 23:10:48 +0800 Subject: [PATCH 01/15] finish (+6 squashed commits) Squashed commits: [c008323] try [2cae6ab] try [b500ed5] try [341c6b4] try [c0ad812] try [bbd6b8f] first draft --- .github/workflows/contracts.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yaml index 477a2e1c79..51759934b4 100644 --- a/.github/workflows/contracts.yaml +++ b/.github/workflows/contracts.yaml @@ -44,6 +44,9 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 with: version: nightly + + - name: Setup LCOV + uses: hrishikesh-kadam/setup-lcov@v1 - name: Install Node.js 14 uses: actions/setup-node@v2 @@ -80,6 +83,19 @@ jobs: - name: Run foundry tests run: forge test -vvv + - name: Run foundry coverage + run : forge coverage --report lcov + + - name: Report code coverage + uses: zgosalvez/github-actions-report-lcov@v3 + with: + coverage-files: contracts/lcov.info + minimum-coverage: 0 + artifact-name: code-coverage-report + github-token: ${{ secrets.GITHUB_TOKEN }} + working-directory: contracts + update-comment: true + hardhat: runs-on: ubuntu-latest From 4197c3774b67e14cfcd9b7e9a46075fdb81093e6 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 00:28:44 +0800 Subject: [PATCH 02/15] trigger ci From 7410f0f4cb09e645905590fa57c52bdcadbcdb43 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 00:43:27 +0800 Subject: [PATCH 03/15] trigger ci From fb3a01f5c69beafbb5af31c27d61665bf544f5b0 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 00:52:28 +0800 Subject: [PATCH 04/15] trigger ci From ba030f2b3e1ffaf709605cd1e3c7b9f30a01766a Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 10:02:15 +0800 Subject: [PATCH 05/15] prune --- .github/workflows/contracts.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yaml index 51759934b4..7139d66a70 100644 --- a/.github/workflows/contracts.yaml +++ b/.github/workflows/contracts.yaml @@ -86,10 +86,13 @@ jobs: - name: Run foundry coverage run : forge coverage --report lcov + - name : Prune coverage + run : lcov --remove ./lcov.info -o ./lcov.info.pruned 'contracts/src/mocks' 'contracts/src/test' 'contracts/scripts' 'contracts/node_modules' 'contracts/lib' + - name: Report code coverage uses: zgosalvez/github-actions-report-lcov@v3 with: - coverage-files: contracts/lcov.info + coverage-files: contracts/lcov.info.pruned minimum-coverage: 0 artifact-name: code-coverage-report github-token: ${{ secrets.GITHUB_TOKEN }} From 57cc1a34009d5ba43009b5b8aa3bdb0c4939b9f9 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 10:12:22 +0800 Subject: [PATCH 06/15] update --- .github/workflows/contracts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yaml index 7139d66a70..1af338b2ed 100644 --- a/.github/workflows/contracts.yaml +++ b/.github/workflows/contracts.yaml @@ -87,7 +87,7 @@ jobs: run : forge coverage --report lcov - name : Prune coverage - run : lcov --remove ./lcov.info -o ./lcov.info.pruned 'contracts/src/mocks' 'contracts/src/test' 'contracts/scripts' 'contracts/node_modules' 'contracts/lib' + run : lcov --remove ./lcov.info -o ./lcov.info.pruned '/src/mocks/*' '/src/test/*' '/scripts/*' '/node_modules/*' '/lib/*' - name: Report code coverage uses: zgosalvez/github-actions-report-lcov@v3 From b0901af60019d91c080c4a99db133b62fb5e8cd3 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 10:30:31 +0800 Subject: [PATCH 07/15] update --- .github/workflows/contracts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yaml index 1af338b2ed..320a2b481b 100644 --- a/.github/workflows/contracts.yaml +++ b/.github/workflows/contracts.yaml @@ -87,7 +87,7 @@ jobs: run : forge coverage --report lcov - name : Prune coverage - run : lcov --remove ./lcov.info -o ./lcov.info.pruned '/src/mocks/*' '/src/test/*' '/scripts/*' '/node_modules/*' '/lib/*' + run : lcov --remove ./lcov.info -o ./lcov.info.pruned 'src/mocks/*' 'src/test/*' 'scripts/*' 'node_modules/*' 'lib/*' - name: Report code coverage uses: zgosalvez/github-actions-report-lcov@v3 From cc9ccc815769a903f8bc484118b37ec3e5102ffd Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 10:37:58 +0800 Subject: [PATCH 08/15] trigger ci From b3ace51767cb5c45b1bffe22b9b8100ef33a6e27 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Fri, 17 Mar 2023 11:02:40 +0800 Subject: [PATCH 09/15] Update contracts.yaml --- .github/workflows/contracts.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/contracts.yaml b/.github/workflows/contracts.yaml index 320a2b481b..afd14bf742 100644 --- a/.github/workflows/contracts.yaml +++ b/.github/workflows/contracts.yaml @@ -2,26 +2,10 @@ name: Contracts on: push: - branches: - - master - - main - - prod - - release/* - - staging - - develop - - alpha paths: - 'contracts/**' - '.github/workflows/contracts.yaml' pull_request: - branches: - - master - - main - - prod - - release/* - - staging - - develop - - alpha paths: - 'contracts/**' - '.github/workflows/contracts.yaml' From 7e973a8c3bae43adda620edfc417648f60590238 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 12:08:17 +0800 Subject: [PATCH 10/15] trigger ci From 36c6abf0b00311d96f1c40fd73c183e21b287a15 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 12:11:52 +0800 Subject: [PATCH 11/15] trigger ci From d2e3b25e43b00ebbc62bde7796547d02d6a7e81f Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 12:33:32 +0800 Subject: [PATCH 12/15] trigger ci From fb865de2ea02931239242415f8edf19ab4c2df20 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 16:20:50 +0800 Subject: [PATCH 13/15] trigger ci From 3d942dad0872b920317db428663c3a62661548f9 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 16:39:21 +0800 Subject: [PATCH 14/15] trigger ci From 3834d3dc1c4469a8da9b4f66ff5cdaf063e4ec63 Mon Sep 17 00:00:00 2001 From: vincent <419436363@qq.com> Date: Fri, 17 Mar 2023 17:22:56 +0800 Subject: [PATCH 15/15] trigger ci