Skip to content

Commit

Permalink
Add cov and fmt workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Changochen committed Nov 16, 2023
1 parent a3b0f4d commit ae22ae2
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "scripts/**"
- "proto/**"


name: Coverage

jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install Prerequisites
run: sh ./install.sh

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.19.1'
args: '-- --test-threads 1'

- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}

- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml
44 changes: 44 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: fmt

on:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "scripts/**"
- "proto/**"
pull_request:
types: [ opened, synchronize ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
fmt:
runs-on: ubuntu-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install Prerequisites
run: sh ./install.sh

- name: add path
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Run fmt check
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Check function complexity
run: python3 -m lizard -l rust src/* -L 300 -a 10

- name: proto lint
run: cd proto && prototool lint . --config-data '{"lint":{"group":"google"}}'

- name: python lint
run: cd scripts && python3 -m pylint --rcfile=.pylintrc *.py | tee | grep 10.00
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# mufuzz, a parallel fuzzing framework

[![build](https://github.com/OMH4ck/mufuzz/actions/workflows/main.yml/badge.svg)](https://github.com/Changochen/mufuzz/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/OMH4ck/mufuzz/branch/main/graph/badge.svg?token=S29YN47226)](https://codecov.io/gh/OMH4ck/mufuzz)
[![fmt](https://github.com/OMH4ck/mufuzz/actions/workflows/fmt.yml/badge.svg)](https://github.com/OMH4ck/mufuzz/actions/workflows/fmt.yml)

The orginal paper can be [here](https://changochen.github.io/publication/mufuzz_usenix_2023.pdf).

## Build
Expand Down

0 comments on commit ae22ae2

Please sign in to comment.