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

Update #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ jobs:
run: cargo test

- name: CI Metrics
# To be more stable you can use a tag e.g.
# https://raw.githubusercontent.com/ci-metrics/script/v0.1.0/run.py
run: |
wget https://raw.githubusercontent.com/JonathanWoollett-Light/cimetrics-script/v0.1.0/run.py
wget https://raw.githubusercontent.com/ci-metrics/script/master/run.py
python3 ./run.py
env:
# Variables to interact with CI Metrics.
PUBLIC_KEY: "6546b543a35b7d5af8c93a7b"
PRIVATE_KEY: ${{ secrets.MetricsPrivateKey }}
PRIVATE_KEY: "206925525691777734527727329171694843736"
# Variables to upload
HEAD: ${{ github.event.pull_request.head.sha }}
DATA_FILE: "./metrics"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ jobs:
run: cargo test

- name: CI Metrics
# To be more stable you can use a tag e.g.
# https://raw.githubusercontent.com/ci-metrics/script/v0.1.0/run.py
run: |
wget https://raw.githubusercontent.com/JonathanWoollett-Light/cimetrics-script/v0.1.0/run.py
wget https://raw.githubusercontent.com/ci-metrics/script/master/run.py
python3 ./run.py
env:
# Variables to interact with CI Metrics.
PUBLIC_KEY: "6546b543a35b7d5af8c93a7b"
PRIVATE_KEY: ${{ secrets.MetricsPrivateKey }}
PRIVATE_KEY: "206925525691777734527727329171694843736"
# Variables to upload
HEAD: ${{ github.event.after }}
DATA_FILE: "./metrics"
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cimetrics-hello-world
# CI Metrics example

This is a volatile experiment, you shouldn't use this, instead use https://github.com/bencherdev/bencher.
A repo presenting an example project using CI Metrics.

A repo presenting an example system for tracking generic metrics in CI like [codecov](https://about.codecov.io).
CI Metrics is a system to track metrics like how [codecov](https://about.codecov.io) track code coverage.

![Example PR comment](./pr_comment_example.webp)

Expand All @@ -16,11 +16,9 @@ This is from http://3.10.39.149:3000/display/6546b543a35b7d5af8c93a7b/2069255256

1. Create account
Run `curl -X POST http://3.10.39.149:3000/users`
Noted down the `public_key` and `private_key`.
Note down the `public_key` and `private_key`.
There is no recovery mechanism, don't loose these.
2. Copy [pull_request.yml](./.github/workflows/pull_request.yml) and [push.yml](./.github/workflows/push.yml) to your repo.
Updating `PUBLIC_KEY` to be your public key.
3. Add a repository secret named `METRICSPRIVATEKEY` with value of your private key.

## Visualize metrics

Expand Down