Skip to content
Open
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
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

permissions:
contents: read
pull-requests: read
pull-requests: write

jobs:
unit-tests:
Expand All @@ -16,7 +16,7 @@ jobs:
permissions:
checks: write
contents: read
pull-requests: read
pull-requests: write

steps:
- name: Checkout
Expand All @@ -33,8 +33,15 @@ jobs:
- name: Install dependencies
run: go mod download

- name: Run unit test
run: make test
- name: Run unit tests with coverage
run: make coverage-report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/cover.out
fail_ci_if_error: true

code-lint:
name: Source code format validation
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/rsksmart/liquidity-provider-server/badge?branch=master)](https://scorecard.dev/viewer/?uri=github.com/rsksmart/liquidity-provider-server)
[![CodeQL](https://github.com/rsksmart/liquidity-provider-server/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/rsksmart/liquidity-provider-server/actions/workflows/codeql.yml?query=branch%3Amaster)
[![Unit Tests](https://github.com/rsksmart/liquidity-provider-server/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/rsksmart/liquidity-provider-server/actions/workflows/ci.yml?query=branch%3Amaster)
[![codecov](https://codecov.io/gh/rsksmart/liquidity-provider-server/branch/master/graph/badge.svg)](https://codecov.io/gh/rsksmart/liquidity-provider-server)

The Liquidity Provider Server (LPS) is a server that interacts with a [Liquidity Bridge Contract (LBC)](https://github.com/rsksmart/liquidity-bridge-contract) to provide liquidity for users as part of the Flyover protocol. This server performs all the necessary operations to play the role of the Liquidity Provider, involving transactions in both Rootstock and Bitcoin networks.

Expand Down
18 changes: 18 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
coverage:
status:
project:
default:
target: auto # baseline is always the current master value
threshold: 1% # allow up to 1% drop before failing the check
patch:
default:
target: 80% # new/changed lines in a PR must be at least 80% covered
threshold: 5% # allow up to 5% below target before failing

comment:
layout: "reach,diff,flags,files"
behavior: default
require_changes: true # only post a comment when coverage actually changes

ignore:
- "internal/adapters/dataproviders/rootstock/bindings/**"
Loading