Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-test-analyze:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install build & analysis tools
run: |
sudo apt update
sudo apt install -y build-essential cmake clang-format

- name: Run clang-format check
run: |
FORMAT_DIFF=$(find . -name "*.cpp" -o -name "*.hpp" -o -name "*.h" | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " || true)
if [[ ! -z "$FORMAT_DIFF" ]]; then
echo "❌ Code formatting issues detected. Run clang-format to fix."
exit 1
fi

- name: Build application and unit tests
run: |
mkdir build && cd build
cmake ..
make

- name: Run Unit Tests
run: |
cd build
./test_unit

- name: Run Integration Test
run: |
cd build
../tests/test_integration.sh
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ Hello world C++ CLI application.

## Features

- [CI](.github/workflows/ci.yaml)
- [Semantic Release](.github/workflows/semantic-release.yaml) on merge to the `main` branch

## Installation and Configuration

### Set Up GitHub Repository for Semantic Release

Set up GitHub actions, variables and secrets:

- GitHub / Repository / Settings
- Actions / General
- Workflow permissions: Read and write permissions

## Development and Testing

Install prerequisites:
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>

int main() {
std::cout << "Hello world" << std::endl;
return 0;
std::cout << "Hello world" << std::endl;
return 0;
}
Loading