Skip to content

add codecov upload action in coverage.yaml #1

add codecov upload action in coverage.yaml

add codecov upload action in coverage.yaml #1

name: Protocol test Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
protocols-coverage:
name: Tarpaulin Test
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:0.27.1-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate code coverage
run: |
./scripts/coverage-protocols.sh
- name: Upload protocols coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols
file: ./protocols/cobertura.xml
flags: protocols
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload binary_codec_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/binary_codec_sv2-coverage.json
flags: binary_codec_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload binary_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/binary_sv2-coverage.json
flags: binary_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload codec_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/codec_sv2-coverage.json
flags: codec_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload common_messages_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/common_messages_sv2-coverage.json
flags: common_messages_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload const_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/const_sv2-coverage.json
flags: const_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload framing_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/framing_sv2-coverage.json
flags: framing_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload job_declaration_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/job_declaration_sv2-coverage.json
flags: job_declaration_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload mining_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/mining_sv2-coverage.json
flags: mining_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload noise_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/noise_sv2-coverage.json
flags: noise_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload roles_logic_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/roles_logic_sv2-coverage.json
flags: roles_logic_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload serde_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/serde_sv2-coverage.json
flags: serde_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload sv1_api-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/sv1_api-coverage.json
flags: sv1_api-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload sv2_ffi-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/sv2_ffi-coverage.json
flags: sv2_ffi-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload template_distribution_sv2-coverage to codecov.io
uses: codecov/codecov-action@v4
with:
directory: ./protocols/target/tarpaulin
file: ./protocols/target/tarpaulin/template_distribution_sv2-coverage.json
flags: template_distribution_sv2-coverage
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}