File tree Expand file tree Collapse file tree 2 files changed +48
-10
lines changed
Expand file tree Collapse file tree 2 files changed +48
-10
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : CI
3+
4+ on :
5+ push :
6+ branches :
7+ - main
8+ pull_request :
9+ branches :
10+ - main
11+
12+ jobs :
13+ build-test-analyze :
14+ runs-on : ubuntu-22.04
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Install build & analysis tools
21+ run : |
22+ sudo apt update
23+ sudo apt install -y build-essential cmake clang-format
24+
25+ - name : Run clang-format check
26+ run : |
27+ FORMAT_DIFF=$(find . -name "*.cpp" -o -name "*.hpp" -o -name "*.h" | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " || true)
28+ if [[ ! -z "$FORMAT_DIFF" ]]; then
29+ echo "❌ Code formatting issues detected. Run clang-format to fix."
30+ exit 1
31+ fi
32+
33+ - name : Build application and unit tests
34+ run : |
35+ mkdir build && cd build
36+ cmake ..
37+ make
38+
39+ - name : Run Unit Tests
40+ run : |
41+ cd build
42+ ./test_unit
43+
44+ - name : Run Integration Test
45+ run : |
46+ cd build
47+ ../tests/test_integration.sh
Original file line number Diff line number Diff line change @@ -4,18 +4,9 @@ Hello world C++ CLI application.
44
55## Features
66
7+ - [ CI] ( .github/workflows/ci.yaml )
78- [ Semantic Release] ( .github/workflows/semantic-release.yaml ) on merge to the ` main ` branch
89
9- ## Installation and Configuration
10-
11- ### Set Up GitHub Repository for Semantic Release
12-
13- Set up GitHub actions, variables and secrets:
14-
15- - GitHub / Repository / Settings
16- - Actions / General
17- - Workflow permissions: Read and write permissions
18-
1910## Development and Testing
2011
2112Install prerequisites:
You can’t perform that action at this time.
0 commit comments