Skip to content

Commit

Permalink
Added static analysis to CI
Browse files Browse the repository at this point in the history
Added a new action that runs static analysis on the firmware code and
adds a badge to README.md.
  • Loading branch information
italo-sampaio committed Dec 14, 2023
1 parent 2ce7566 commit e6f54c9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Static analysis"

on: [push]

jobs:
static-analysis:
name: Run ledger static analysis
runs-on: ubuntu-20.04

steps:
- name: Checkout this repo
uses: actions/checkout@v3

- name: Build the middleware docker image
run: docker/mware/build

- name: Run static analysis
run: |
ledger/static-analysis/gen-static-analysis
- name: Generate Markdown report
if: always()
run: |
python ledger/static-analysis/gen-report.py \
-d ledger/static-analysis/output \
-o ledger/static-analysis/output/report.md
- name: Write to job summary
if: always()
run: |
cat ledger/static-analysis/output/report.md > $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![C linter](https://github.com/rsksmart/rsk-powhsm/actions/workflows/lint-c.yml/badge.svg)
[![Middleware coverage](https://img.shields.io/endpoint?url=https://d16sboe9lzo4ru.cloudfront.net/powhsm_4.1.x/middleware_coverage_report/badge.json)](https://d16sboe9lzo4ru.cloudfront.net/powhsm_4.1.x/middleware_coverage_report/index.html)
[![Firmware coverage](https://img.shields.io/endpoint?url=https://d16sboe9lzo4ru.cloudfront.net/powhsm_4.1.x/firmware_coverage_report/badge.json)](https://d16sboe9lzo4ru.cloudfront.net/powhsm_4.1.x/firmware_coverage_report/index.html)

![Static analysis](https://github.com/rsksmart/rsk-powhsm/actions/workflows/static-analysis.yml/badge.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

## About
Expand Down

0 comments on commit e6f54c9

Please sign in to comment.