Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ci add solidity code coverages #140

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b453809
ci: add solidity coverage workflow
sdpisreddevil Oct 5, 2023
31ad268
ci: test codcov workflow
DeepakBomjan Oct 6, 2023
0f5e9ef
ci: debug foundy setup issue
DeepakBomjan Oct 6, 2023
14be2ef
ci: debug foundy setup issue
DeepakBomjan Oct 6, 2023
71c4c4e
ci: debug foundy setup issue
DeepakBomjan Oct 6, 2023
f8c6e6c
ci: debug foundy setup issue
DeepakBomjan Oct 6, 2023
eb5cc8e
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
fd96484
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
1483491
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
58367c2
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
f17ddbe
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
f27df44
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
8f2f20a
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
42441b6
ci: export foundryup PATH
DeepakBomjan Oct 6, 2023
d12e082
ci: fix build on forge
sdpisreddevil Oct 6, 2023
94a1669
ci: fix build on forge
sdpisreddevil Oct 6, 2023
a4ed33e
ci: fix build on forge
sdpisreddevil Oct 6, 2023
f135565
ci: fix build on forge
sdpisreddevil Oct 6, 2023
19ff4c9
ci: fix build on forge
sdpisreddevil Oct 6, 2023
73fa5c5
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
ed536d7
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
dd8ec62
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
daa4445
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
f9606aa
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
4012fad
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
8f67c54
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
8bbe6d1
ci: fix build path on workflows
sdpisreddevil Oct 6, 2023
4de4f86
ci: fix build paths on workflows
sdpisreddevil Oct 6, 2023
2cea613
ci: add workflow for solidity-tests
sdpisreddevil Oct 6, 2023
9be7fff
ci: add env on workflow
sdpisreddevil Oct 6, 2023
fafea14
ci: update test workflow
sdpisreddevil Oct 6, 2023
2e219aa
ci: update test workflow ignore libraries from coverage folder
sdpisreddevil Oct 11, 2023
a599841
ci: install lcov
sdpisreddevil Oct 11, 2023
b21d890
ci: install lcov
sdpisreddevil Oct 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/solidity-contracts-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Solidity Contracts tests

on:
pull_request:
branches:
- "**"
paths:
- "contracts/evm/**"
- ".github/workflows/solidity-cov.yml"
push:
branches:
- "**"

env:
FOUNDRY_PROFILE: ci

defaults:
run:
working-directory: contracts/evm/xcall

jobs:
check:
strategy:
fail-fast: true

name: xCall-Multi Solidity Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Forge build
run: |
forge --version
forge remappings
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv
id: test
53 changes: 53 additions & 0 deletions .github/workflows/solidity-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Solidity contracts Codecov

env:
FOUNDRY_PROFILE: ci

on:
pull_request:
branches:
- "**"
paths:
- "contracts/evm/**"
- ".github/workflows/solidity-cov.yml"
push:
branches:
- "**"

defaults:
run:
working-directory: contracts/evm/xcall

jobs:
code-coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Build Contracts
run: |
forge remappings
forge build

- name: Generate code coverage
run: |
export PATH=$PATH:$HOME/.config/.foundry/bin
forge coverage --report lcov
sudo apt-get install lcov
lcov --remove lcov.info 'test/*' 'script/*' '**/library/*' '**/libraries/**' > lcov2.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov2.info
flags: solidity
fail_ci_if_error: true
Loading