ci create + some fixes
Some checks are pending
Pipeline / ci (push) Waiting to run

This commit is contained in:
Wingleszy
2026-05-14 01:39:55 +03:00
parent 17301a9cf8
commit 52fc63054b
4 changed files with 52 additions and 4 deletions

31
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,31 @@
name: Pipeline
on:
push:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Copy
uses: actions/checkout@v4
- name: download cppcheck
run: sudo apt update && sudo apt install -y cppcheck
- name: run cppcheck
run: cppcheck project_cpp/
- name: run tests
run: make test
- name: build
run: make
- name: run
run: ./main

13
Makefile Normal file
View File

@@ -0,0 +1,13 @@
CC = g++
all: main
main: project_cpp/main.cpp tests/tests.cpp
$(CC) -o main
test: tests/tests.cpp
$(CC) tests/tests.cpp -o test
./test
clean:
rm -f main test

View File

@@ -18,9 +18,12 @@ int devide (int a, int b) {
return round(a / b);
}
// int main () {
int main () {
std::cout << "ADD: " << add(4, 5) << "\n";
std::cout << "ADD: " << substraction(13, 9) << "\n";
std::cout << "ADD: " << multiple(4,2) << "\n";
std::cout << "ADD: " << devide(4,2) << "\n";
// return 0;
// }
return 0;
}

View File

@@ -53,5 +53,6 @@ int main () {
substraction_test();
multiple_test();
devide_test();
std::cout << "ALL PASSED!!!";
return 0;
}