Skip to content

Commit

Permalink
Merge pull request #169 from hirosystems/feat/improve-readme
Browse files Browse the repository at this point in the history
Document CI capability
  • Loading branch information
lgalabru authored Dec 7, 2021
2 parents 837e589 + baa10da commit ea486e4
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sudo apt install build-essential pkg-config libssl-dev
You can build Clarinet from source using Cargo with the following commands:

```bash
git clone git@github.com:hirosystems/clarinet.git --recursive
git clone https://github.com/hirosystems/clarinet.git --recursive
cd clarinet
cargo install --path . --locked
```
Expand Down Expand Up @@ -235,6 +235,34 @@ evaluation on a blockchain. Use the following command:
$ clarinet deploy --testnet
```

### Use Clarinet in your CI workflow as a GitHub Action

Clarinet can be used in GitHub Actions as a step of your CI workflows.
You can set-up a simple workflow by adding the following steps in a file `.github/workflows/github-actions-clarinet.yml`:

```yaml
name: CI
on: [push]
jobs:
tests:
name: "Test contracts with Clarinet"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Execute unit tests"
uses: docker://hirosystems/clarinet:latest
with:
args: test --coverage --manifest-path=./Clarinet.toml
- name: "Export code coverage"
uses: codecov/codecov-action@v1
with:
files: ./coverage.lcov
verbose: true
```
Or add the steps above in your existing workflows.
The generated code coverage output can then be used as is with GitHub Apps like https://codecov.io.
### Extensions
Clarinet can easily be extended by community members: open source contributions to clarinet are welcome, but developers can also write their own clarinet extensions if they want to integrate clarity contracts with their own tooling and workflow.
Expand Down

0 comments on commit ea486e4

Please sign in to comment.