Обновить .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: on:
push: push:
branches: branches:
- main - main # Запуск только при пуше в main
- master
- ci/setup
jobs: jobs:
lint: lint:
name: Lint name: 1. Lint (Static Analysis)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install cppcheck - 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 - name: Run cppcheck
run: | 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: test:
name: Test name: 2. Test (Unit Tests)
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: lint needs: lint # Запускается только если Lint прошел успешно
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - 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: | run: |
cd build sudo apt-get update
ctest --output-on-failure --verbose sudo apt-get install -y cmake build-essential
./test_calculator
- name: Build and Test
run: |
cmake -B build
cmake --build build
cd build && ctest --output-on-failure
build: build:
name: Build name: 3. Build (Release)
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: test # Запускается только если Test прошел успешно
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install dependencies - name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential run: |
- name: Build sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Build Release
run: | run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build cmake --build build
# Блок Upload artifact удален