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

integrate test code coverage #71

Closed
Tracked by #2532
tzemanovic opened this issue Feb 4, 2022 · 4 comments
Closed
Tracked by #2532

integrate test code coverage #71

tzemanovic opened this issue Feb 4, 2022 · 4 comments
Assignees
Labels
CI enhancement New feature or request pre-mainnet Must happen before mainnet. testing

Comments

@tzemanovic
Copy link
Member

this can run in the CI

@james-chf
Copy link
Contributor

cargo llvm-cov works with our codebase, we could use that. It can export the coverage in lcov format which can then be used with IDE plugins like like Coverage Gutters for VS Code, or uploaded to a service like codecov.io.

Proof of concept - https://app.codecov.io/gh/james-chf/namada-fork/tree/james-chf%2Fcoveralls is the coverage for main generated after running the following command (which also requires cargo-nextest ):

cargo llvm-cov nextest \
    --lcov --output-path .hack/lcov.info --features namada/testing -E "not test(e2e)"

@cwgoes
Copy link
Contributor

cwgoes commented Jan 12, 2023

@james-chf @juped can we integrate automatic coverage?

@james-chf
Copy link
Contributor

I see we already run coverage in CI and publish it as an artifact -

- uses: taiki-e/install-action@cargo-llvm-cov
- name: Run unit test
run: make test-unit-coverage${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage${{ matrix.make.suffix }}-${{ github.event.pull_request.head.sha || github.sha }}
path: target/html
retention-days: 3

We could probably upload the coverage file as well to a service like https://codecov.io or https://coveralls.io, to get a nice UI for browsing code coverage (there is also some GitHub integrations we could look at e.g. bots that comment on PRs w.r.t. how they increase (or decrease) test coverage)

@james-chf james-chf moved this from Todo to Low-prio in Namada-Old Jan 23, 2023
@james-chf james-chf moved this from Low-prio to Todo in Namada-Old Feb 8, 2023
@james-chf james-chf moved this from Todo to Low-prio in Namada-Old Feb 8, 2023
@james-chf james-chf removed their assignment Feb 9, 2023
@cwgoes cwgoes added the pre-mainnet Must happen before mainnet. label Feb 5, 2024
@cwgoes cwgoes mentioned this issue Feb 6, 2024
6 tasks
@grarco
Copy link
Contributor

grarco commented Feb 12, 2024

Closed by #2148

@grarco grarco closed this as completed Feb 12, 2024
@github-project-automation github-project-automation bot moved this from Low-prio to Tested in Devnet in Namada-Old Feb 12, 2024
phy-chain pushed a commit to phy-chain/namada that referenced this issue Mar 1, 2024
* Begin setting up KeyRing & accounts storage

* Adding a simple typed state class to keyring

* Address helper to obtain ImplicitAddress, cargo update

* Continue hooking up KeyRing to services

* Fix broken imports, confirm message works in popup

* Adding msg type for fetch generated mnemonic, update tests

* Beginning components package; get styled-components with theme working

* Disable devtool sourcemapping, add plugin for extension reloading (all browsers)

* Properly include svg assets, port additional components into shared
package

* Fix issue on reloader plugin

* fix module resolution, clean up imports

* Remove unnecessary assignment

* Consolidate types from Keplr into our own

* Validate mnemonic phrase before storing, better error handling in wasm

* Minor clean up, better type State class so as not to instantiate
directly

* Adding mnemonic/password creation screens, added README for types

* Split set-up flow into new tab for initial account

* Begin wiring up account derivation in service, generate implicit address
to store and return

* Add account derivation to completion process, load and display accounts

* Better error-handling, add user feedback on account creation

* Adding AccountListing components

* Clean up configs, layout, fixed bug in key storage

* KeyRing state is no longer duplicated, storage is only source of truth

* Add icon for copy to clipboard, additional styling, update styled config

* description -> alias to match cli, clean up

* Adding UI for adding a new derived account with basic validation

* Fix bug where alias is not being saved

* Add "alias" as a field during setup

* Updating for consistency, rough pass at styling derivation form

* Move path items to number, validate inputs, set primes appropriately

* Remove unnecessary folders, directly link build to App and Setup

* Minor changes per PR feedback

* Linting, final bit of PR feedback

* Commiting artifacts for legacy @anoma/wasm package, remove from build

* Fix e2e tests (don't run wasm:build - it's unnecessary)

* Disable unit test workflow on PR push (until we have updated wasm)

* Disable reporting on unit tests for now (until building against latest
Namada)

* Disable unit test reporting for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI enhancement New feature or request pre-mainnet Must happen before mainnet. testing
Projects
No open projects
Status: Tested in Devnet
Development

No branches or pull requests

5 participants