mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-07 16:03:09 +00:00
Restore coverage
This commit is contained in:
parent
95aa358ef3
commit
f7a61ffe0d
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@ -140,14 +140,14 @@ jobs:
|
|||||||
echo "ncpu=$ncpu" >> $GITHUB_ENV
|
echo "ncpu=$ncpu" >> $GITHUB_ENV
|
||||||
echo "MAKE_CMD=${MAKE_CMD}" >> $GITHUB_ENV
|
echo "MAKE_CMD=${MAKE_CMD}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# - name: Restore nimble dependencies from cache
|
- name: Restore nimble dependencies from cache
|
||||||
# id: nimble_deps
|
id: nimble_deps
|
||||||
# uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
# with:
|
with:
|
||||||
# path: |
|
path: |
|
||||||
# ~/.nimble/pkgs2
|
~/.nimble/pkgs2
|
||||||
# ~/.nimble/packages_official.json
|
~/.nimble/packages_official.json
|
||||||
# key: ${{ inputs.os }}-${{ inputs.cpu }}-${{ env.cache_nonce }}
|
key: ${{ inputs.os }}-${{ inputs.cpu }}-${{ env.cache_nonce }}
|
||||||
|
|
||||||
- name: Setup Nimble
|
- name: Setup Nimble
|
||||||
uses: "./.github/actions/install_nimble"
|
uses: "./.github/actions/install_nimble"
|
||||||
|
|||||||
70
.github/workflows/codecov.yml
vendored
Normal file
70
.github/workflows/codecov.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
name: Generate and upload code coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
#On push to common branches, this computes the "bases stats" for PRs
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
All_Tests:
|
||||||
|
name: All tests
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
nim-options: [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
test-program: [
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Environment setup
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y lcov build-essential git curl
|
||||||
|
mkdir coverage
|
||||||
|
|
||||||
|
- name: Setup Nimble
|
||||||
|
uses: "./.github/actions/install_nimble"
|
||||||
|
with:
|
||||||
|
os: linux
|
||||||
|
cpu: x64
|
||||||
|
|
||||||
|
- name: Restore nimble dependencies from cache
|
||||||
|
id: nimble_deps
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.nimble/pkgs2
|
||||||
|
~/.nimble/packages_official.json
|
||||||
|
key: linux-x64-${{ env.cache_nonce }}
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
nimble -y --verbose ${{ matrix.test-program }} --opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.nim-options }}
|
||||||
|
cd nimcache; rm *.c; cd ..
|
||||||
|
|
||||||
|
- name: Generate coverage data
|
||||||
|
run: |
|
||||||
|
mkdir coverage
|
||||||
|
lcov --capture --directory nimcache --output-file coverage/coverage.info
|
||||||
|
shopt -s globstar
|
||||||
|
ls $(pwd)/libp2pdht/{*,**/*}.nim
|
||||||
|
lcov --extract coverage/coverage.info $(pwd)/libp2pdht/{*,**/*}.nim --output-file coverage/coverage.f.info
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
directory: ./coverage/
|
||||||
|
fail_ci_if_error: true
|
||||||
|
files: ./coverage/coverage.f.info
|
||||||
|
flags: unittests
|
||||||
|
name: codecov-umbrella
|
||||||
|
verbose: true
|
||||||
Loading…
x
Reference in New Issue
Block a user