Skip to content

Commit

Permalink
Merge branch 'main' into add-unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexD10S committed May 13, 2024
2 parents 8cae7d9 + 85353ae commit a808bd1
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 9 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/build.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Test Pop-CLI
name: ci

on:
push:
Expand Down Expand Up @@ -49,8 +49,31 @@ jobs:
git-user: ${{ env.GITHUB_ACTOR }}

- name: Run unit tests
run: cargo test --lib
run: cargo test --lib --bins

coverage:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: "./.github/actions/init"
with:
git-user: ${{ env.GITHUB_ACTOR }}

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lib --bins --codecov --output-path codecov.json

- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true

contract-integration-tests:
needs: lint
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
cargo install --locked --no-default-features --features contract,parachain --path ./crates/pop-cli
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
cargo install --locked --no-default-features --features contract,parachain --path ./crates/pop-cli
- name: Run Pop Install
run: |
. "$HOME/.cargo/env"
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
cargo install --locked --no-default-features --features contract,parachain --path ./crates/pop-cli
- name: Run Pop Install
run: |
. "$HOME/.cargo/env"
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
cargo install --locked --no-default-features --features contract,parachain --path ./crates/pop-cli
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
cargo install --locked --no-default-features --features contract,parachain --path ./crates/pop-cli
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ You can install Pop CLI as follows:
```shell
cargo install --locked --git https://github.com/r0gue-io/pop-cli
```
> For detailed instructions on how to install Pop CLI, please refer to our documentation: https://learn.onpop.io/pop/v/pop-cli/welcome/installing-pop-cli
> :information_source: A [crates.io](https://crates.io/crates/pop-cli) version will be available soon!

> :information_source: For detailed instructions on how to install Pop CLI, please refer to our
> documentation: https://learn.onpop.io/v/cli/welcome/installing-pop-cli
>
> A [crates.io](https://crates.io/crates/pop-cli) version will be available soon!
### Telemetry

Pop CLI collects anonymous usage metrics to help us understand how the tool is being used and how we can improve it.
We do not collect any personal information. If you wish to disable telemetry
or read more about our telemetry practices please see
our [telemetry](crates/pop-telemetry/README.md) documentation.

## Getting Started

Expand All @@ -33,6 +43,7 @@ pop new parachain my-app
```

`pop-cli` supports diverse project templates, to use a specific one use the flag `--template`:

```sh
# Create an assets parachain
pop new parachain my-app pop -t assets
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# https://docs.codecov.com/docs/common-recipe-list
coverage:
status:
project:
default:
target: auto
threshold: 0%
comment:
layout: " diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: true
hide_project_coverage: false
72 changes: 72 additions & 0 deletions crates/pop-telemetry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Telemetry

Anonymous Usage Metrics Collection with Umami

## Umami

Umami is an analytics platform that is privacy-focused and open-source. It is a great alternative to Google Analytics.
We self-host Umami in the EU to safeguard all anonymous data.

You can read more about Umami [here](https://umami.is/).

## Why Collect Anonymous Usage Metrics?

We understand the importance of privacy and are committed to safeguarding the data of our users. Collecting
anonymous usage metrics can provide invaluable insights into how our CLI tool is being utilized, allowing us to improve
its performance, reliability, and user experience. Here's why we collect anonymous usage metrics:

1. **Improving User Experience**: By understanding how our CLI tool is used in real-world scenarios, we can identify
areas for improvement and prioritize features that will enhance the overall user experience.

2. **Bug Identification and Resolution**: Anonymous usage metrics help us identify and prioritize bugs and issues that
may not be immediately apparent. This allows us to provide quicker resolutions and ensure a smoother user experience.

3. **Feature Prioritization**: Knowing which features are used most frequently helps us prioritize development efforts
and allocate resources effectively to meet the needs of our users.

## What We Collect

We do **not** collect **any** personal information. We do not collect file names, GitHub repositories, or anything
that is potentially sensitive. We do not even try to collect and sanitize this data, we simply do not collect it.
Here is what we do collect, anonymously:

1. **Command Usage**: We collect information about the commands that are executed using our CLI tool. This includes
the type of command and options used. For example, we may report that `pop new parachain` was executed with the Pop
Standard template.
2. **CLI Usage**: We collect information about how often the CLI tool is used.

## Our Commitment to Privacy

We take privacy seriously and are committed to protecting the anonymity of our users. Here's how we ensure your privacy:

- **Anonymous Data Collection**: We only collect anonymized usage metrics, which do not contain any personally
identifiable information.

- **Transparency**: We are transparent about the data we collect and how it is used. Some portions of the data will be
made public,
such as the number of times a command was executed, and total number of users.

- **Privacy-First Platform**: We use Umami, a privacy-focused and open-source analytics platform, to collect anonymous
usage metrics.

- **EU and GDPR Compliance**: We self-host Umami in the EU to ensure compliance with the General Data Protection
Regulation (GDPR) and safeguard the data of our users. This ensures there is no 3rd party involved in the data.

## How to Opt-Out

If you prefer not to participate in anonymous usage metrics collection, you can completely disable telemetry by
installing Pop CLI with it disabled.

```bash
cargo install --locked --no-default-features --features contract,parachain --git "https://github.com/r0gue-io/pop-cli"
```

## Questions or Concerns?

If you have any questions or concerns regarding our telemetry practices, please don't
hesitate to contact us:

- Contact form: [r0gue.io/contact](https://r0gue.io/contact)
- Telegram: [@Pop_Network](https://t.me/Pop_Network)

Thank you for your support and understanding.
1 change: 1 addition & 0 deletions crates/pop-telemetry/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
use reqwest::Client;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::{json, Value};
Expand Down

0 comments on commit a808bd1

Please sign in to comment.