diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 007d7d03ad..5f0b162407 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -417,3 +417,28 @@ jobs: make test ./test working-directory: ./stdlib + + coverage: + runs-on: ubuntu-latest + container: ghcr.io/hyperledger/solang-llvm:ci-5 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools + - name: cargo install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: cargo llvm-cov + run: cargo llvm-cov --all-features --lcov --output-path lcov.info + env: + CARGO_HUSKY_DONT_INSTALL_HOOKS: true + - name: Upload coverage report to codecov.io + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + fail_ci_if_error: true