From 0288a63a6da07a0d745a9451818e3320719d89b9 Mon Sep 17 00:00:00 2001 From: Guenael Date: Fri, 10 Dec 2021 00:28:51 -0500 Subject: [PATCH] feat(CI): unit-test integraed in the CI & typo fix --- .github/workflows/ci.yml | 11 ++++++++--- rtlsdr_wsprd.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a2cd75..f4b2c08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,10 @@ jobs: sudo apt-get -y install build-essential cmake libfftw3-dev libusb-1.0-0-dev librtlsdr-dev libcurl4-gnutls-dev cppcheck iwyu make - - name: SAST check (C/C++ code analysis) + - name: Perform CodeQL Analysis (SAST) + uses: github/codeql-action/analyze@v1 + + - name: Cppcheck (C/C++ format & best best-practice) run: | echo "===== CPPCHECK =====" cppcheck --std=c11 *.c wsprd/*.c @@ -55,5 +58,7 @@ jobs: echo "===== CODESPELL =====" codespell -L 'rcall' *.c *.h wsprd/*.c wsprd/*.h - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Unit-Test + run: | + echo "===== Decoder self-test =====" + ./rtlsdr_wsprd -t decoder diff --git a/rtlsdr_wsprd.c b/rtlsdr_wsprd.c index fcc00e2..1929a27 100644 --- a/rtlsdr_wsprd.c +++ b/rtlsdr_wsprd.c @@ -587,7 +587,7 @@ int32_t decoderSelfTest() { dec_results[i].pwr); } - /* Simple consistancy check */ + /* Simple consistency check */ if (strcmp(dec_results[0].call, "K1JT") && strcmp(dec_results[0].loc, "FN20") && strcmp(dec_results[0].pwr, "20")) {