Skip to content

Commit

Permalink
Readme: badges (#3)
Browse files Browse the repository at this point in the history
* github: update node version

* github: coverall

* package: formatReadme

* README: add badges

* README: cleanup

* package: coverage
  • Loading branch information
hbbio committed Feb 6, 2024
1 parent 5f563c3 commit fcf2222
Show file tree
Hide file tree
Showing 5 changed files with 436 additions and 18 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/coverall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on: ["push", "pull_request"]

name: Test Coveralls

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: run coverage
run: npm run coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5

strategy:
matrix:
node-version: [19.x]
node-version: [20.x]

steps:
- name: "Checkout current repository"
Expand Down
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# graph, a directed graph library
# graph, a small directed graph library

Graph is a simple directed graph library written in TypeScript, that provides:
[![CI](https://github.com/okcontract/graph/actions/workflows/main.yml/badge.svg)](https://github.com/okcontract/graph/actions?query=branch%3Amain++)
[![Coverage Status](https://coveralls.io/repos/github/okcontract/graph/badge.svg?branch=main)](https://coveralls.io/github/okcontract/graph?branch=main)
[![size](https://deno.bundlejs.com/badge?q=@okcontract/graph)](https://bundlephobia.com/package/@okcontract/graph)

Graph is a simple directed graph library with no runtime dependency written in
TypeScript, that provides:

- Ability to add and remove node and edges
- (Partial) topological sort
- Cache paths for cases with (much) more reads than writes
- Export to graphviz `.dot` files

This library has no dependencies and the build artifact is 3.6kB (1.41kB gzipped).

# Walkthrough

```ts
Expand Down Expand Up @@ -41,17 +44,23 @@ console.log(
string: "style=filled,fillcolor=aquamarine",
number: "style=filled,fillcolor=gold",
object: "style=filled,fillcolor=hotpink",
}
)
},
),
);
```

# About

`graph` is written by the team at [OKcontract](https://okcontract.com) and is released under the MIT license.
`graph` is written by the team at [OKcontract](https://okcontract.com) and is
released under the MIT license.

We aim for ease of use and correction. Chasing down any bug is our top priority.
We aim for ease of use and correction. Chasing down any bug is our top
priority.

Contributors are welcome, feel free to submit PRs directly for small changes. You can also reach out in our [Discord](https://discord.gg/Cun5aF7k) or contact us on [Twitter](https://x.com/okcontract) in advance for larger contributions.
Contributors are welcome, feel free to submit PRs directly for small changes.
You can also reach out in our [Discord](https://discord.gg/Cun5aF7k) or
contact us on [Twitter](https://x.com/okcontract) in advance for larger
contributions.

This work is supported in part by a RFG grant from [Optimism](https://optimism.io).
This work is supported in part by a RFG grant from
[Optimism](https://optimism.io).
Loading

0 comments on commit fcf2222

Please sign in to comment.