-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from RobertGawron/develop
Develop
- Loading branch information
Showing
39 changed files
with
158 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Software/NUCLEO-F091RC/Drivers/* linguist-vendored |
43 changes: 43 additions & 0 deletions
43
Software/HardwareDataLogger/.github/workflows/static-code-analysis.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Static Code Analysis | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build_and_test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
- name: install cppcheck and run tests | ||
run: | | ||
sudo apt-get install -y cppcheck | ||
cd ./ContinousIntegration | ||
chmod +x ./run_c_static_code_analysis.sh | ||
ls run_c_static_code_analysis.sh | ||
./run_c_static_code_analysis.sh | ||
- uses: actions/checkout@v1 | ||
- name: install flake8 and run tests | ||
if: always() | ||
run: | | ||
sudo pip install flake8 flake8-html | ||
cd ./ContinousIntegration | ||
chmod +x ./run_python_static_code_analysis.sh | ||
ls | ||
./run_python_static_code_analysis.sh | ||
- name: Archive Python results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Report for Python sources | ||
path: ./ContinousIntegration/python_lint_repport/ | ||
|
||
- name: Archive C results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Report for C sources | ||
path: ./ContinousIntegration/C_Lint_*.txt |
24 changes: 24 additions & 0 deletions
24
Software/HardwareDataLogger/.github/workflows/unit-test.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Unit Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build_and_test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build and run tests | ||
run: | | ||
sudo pip install pytest pytest-html | ||
cd ./ContinousIntegration | ||
chmod +x ./run_unit_tests.sh | ||
./run_unit_tests.sh | ||
- name: Archive component test results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: Report for Unit Tests | ||
path: ./Test/UnitTest/test_*/*xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Continous Integration | ||
|
||
This folder contains scripts run by GitHub continuous integration module. These scripts should be also run locally before pull request. |
13 changes: 13 additions & 0 deletions
13
Software/HardwareDataLogger/ContinousIntegration/run_c_static_code_analysis.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cppcheck --enable=all --inline-suppr --force --quiet --error-exitcode=1 ../Software/NUCLEO-F091RC/Inc ../Software/NUCLEO-F091RC/Src 2>C_Lint_ReportFull.txt | ||
|
||
# look for errors in gm_* files (those are application files we are interested in) | ||
# store them to separate log ans show them on stdout | ||
grep -F '[../Software/NUCLEO-F091RC/Src/gm_' C_Lint_ReportFull.txt > C_Lint_ReportApplicationOnly.txt | ||
cat C_Lint_ReportApplicationOnly.txt | ||
|
||
# set exit code to ok if no errors were found in application files | ||
if [ $(cat C_Lint_ReportApplicationOnly.txt | wc -l) -eq 0 ]; then | ||
true | ||
else | ||
false | ||
fi |
1 change: 1 addition & 0 deletions
1
Software/HardwareDataLogger/ContinousIntegration/run_python_static_code_analysis.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flake8 --format=html --htmldir=python_lint_repport ../Simulation/FirmwarePCSimulator |
18 changes: 18 additions & 0 deletions
18
Software/HardwareDataLogger/ContinousIntegration/run_unit_tests.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cd ../Test/UnitTest && \ | ||
\ | ||
\ | ||
cd test_gm_circular_buffer && \ | ||
make clean && \ | ||
make -j12 && \ | ||
ls -l && \ | ||
./test_gm_circular_buffer --output=./test_gm_circular_buffer.xml && | ||
\ | ||
\ | ||
cd .. && \ | ||
\ | ||
\ | ||
cd test_gm_histogram && \ | ||
make clean && \ | ||
make -j12 && \ | ||
ls -l && \ | ||
./test_gm_histogram --output=./test_gm_histogram.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
Software/HardwareDataLogger/Software/NUCLEO-F091RC/Inc/gm_dose_counter.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
Software/HardwareDataLogger/Software/NUCLEO-F091RC/Src/gm_dose_counter.c
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.