Обновить .gitea/workflows/ci.yml
All checks were successful
CI Pipeline / 1. Lint (Static Analysis) (push) Successful in 40s
CI Pipeline / 2. Test (Unit Tests) (push) Successful in 41s
CI Pipeline / 3. Build (Release) (push) Successful in 41s

This commit is contained in:
2026-05-16 20:25:52 +03:00
parent fb2289214f
commit e08c4aeb61

View File

@@ -3,50 +3,55 @@ name: CI Pipeline
on:
push:
branches:
- main
- master
- ci/setup
- main # Запуск только при пуше в main
jobs:
lint:
name: Lint
name: 1. Lint (Static Analysis)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
run: sudo apt-get update && sudo apt-get install -y cppcheck
run: |
sudo apt-get update
sudo apt-get install -y cppcheck
- name: Run cppcheck
run: |
cppcheck --enable=all --inconclusive -I include/ --suppress=missingIncludeSystem src/ tests/ --error-exitcode=1
cppcheck --enable=all -I include/ --suppress=missingIncludeSystem src/ tests/ --error-exitcode=1
test:
name: Test
name: 2. Test (Unit Tests)
runs-on: ubuntu-latest
needs: lint
needs: lint # Запускается только если Lint прошел успешно
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential
- name: Configure
run: cmake -B build
- name: Build
run: cmake --build build
- name: Run tests
run: |
cd build
ctest --output-on-failure --verbose
./test_calculator
sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Build and Test
run: |
cmake -B build
cmake --build build
cd build && ctest --output-on-failure
build:
name: Build
name: 3. Build (Release)
runs-on: ubuntu-latest
needs: test
needs: test # Запускается только если Test прошел успешно
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential
- name: Build
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Build Release
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
# Блок Upload artifact удален