Skip to content

Commit ea486e4

Browse files
authored
Merge pull request #169 from hirosystems/feat/improve-readme
Document CI capability
2 parents 837e589 + baa10da commit ea486e4

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ sudo apt install build-essential pkg-config libssl-dev
6464
You can build Clarinet from source using Cargo with the following commands:
6565

6666
```bash
67-
git clone git@github.com:hirosystems/clarinet.git --recursive
67+
git clone https://github.com/hirosystems/clarinet.git --recursive
6868
cd clarinet
6969
cargo install --path . --locked
7070
```
@@ -235,6 +235,34 @@ evaluation on a blockchain. Use the following command:
235235
$ clarinet deploy --testnet
236236
```
237237

238+
### Use Clarinet in your CI workflow as a GitHub Action
239+
240+
Clarinet can be used in GitHub Actions as a step of your CI workflows.
241+
You can set-up a simple workflow by adding the following steps in a file `.github/workflows/github-actions-clarinet.yml`:
242+
243+
```yaml
244+
name: CI
245+
on: [push]
246+
jobs:
247+
tests:
248+
name: "Test contracts with Clarinet"
249+
runs-on: ubuntu-latest
250+
steps:
251+
- uses: actions/checkout@v2
252+
- name: "Execute unit tests"
253+
uses: docker://hirosystems/clarinet:latest
254+
with:
255+
args: test --coverage --manifest-path=./Clarinet.toml
256+
- name: "Export code coverage"
257+
uses: codecov/codecov-action@v1
258+
with:
259+
files: ./coverage.lcov
260+
verbose: true
261+
```
262+
263+
Or add the steps above in your existing workflows.
264+
The generated code coverage output can then be used as is with GitHub Apps like https://codecov.io.
265+
238266
### Extensions
239267
240268
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.

0 commit comments

Comments
 (0)