Skip to content

Commit

Permalink
chore(codecov): add codecov reporting for CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Sep 27, 2023
1 parent 637c356 commit 9008526
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/ci.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ on:

name: ci
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install protobuf
run: sudo apt-get install -y protobuf-compiler
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.0
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run tests
run: cargo test --all --all-features

lint:
runs-on: ubuntu-latest
steps:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
coverage:
status:
patch: off
project:
default:
threshold: null
informational: true
github_checks:
annotations: false
comment:
layout: "reach, files, flags, components"
require_changes: true
component_management:
individual_components:
- component_id: rundler_binary
name: rundler binary
paths:
- bin/**
- component_id: builder
name: builder
paths:
- crates/builder/**
- component_id: dev
name: dev
paths:
- crates/dev/**
- component_id: pool
name: pool
paths:
- crates/pool/**
- component_id: provider
name: provider
paths:
- crates/provider/**
- component_id: rpc
name: rpc
paths:
- crates/rpc/**
- component_id: sim
name: sim
paths:
- crates/sim/**
- component_id: tasks
name: tasks
paths:
- crates/tasks/**
- component_id: types
name: types
paths:
- crates/types/**
- component_id: utils
name: utils
paths:
- crates/utils/**
52 changes: 52 additions & 0 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
pull_request:
merge_group:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

name: unit
jobs:
test:
name: unit-tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview

- name: Install protobuf
run: sudo apt-get install -y protobuf-compiler

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Run tests
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info \
--locked --all-features --workspace
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: unit-tests

0 comments on commit 9008526

Please sign in to comment.