Skip to content

Commit 89c6c81

Browse files
committed
ci: add ci workflow stub
1 parent 6566d86 commit 89c6c81

File tree

2 files changed

+48
-10
lines changed

2 files changed

+48
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff 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

2112
Install prerequisites:

0 commit comments

Comments
 (0)