diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff355b9b..335995e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,15 +63,15 @@ jobs: - name: Test run after install if: matrix.make == 'test-release' run: | - ./local_installation/bin/service_template --config=./local_installation/etc/service_template/static_config.yaml & + ./local_installation/bin/Timetable-VSU-backend --config=./local_installation/etc/Timetable-VSU-backend/static_config.yaml & - name: Check work run service if: matrix.make == 'test-release' run: | - ps aux | grep service_template | grep config && curl http://localhost:8080/ping -v + ps aux | grep Timetable-VSU-backend | grep config && curl http://localhost:8080/ping -v - name: Stop all if: matrix.make == 'test-release' run: | - killall service_template + killall Timetable-VSU-backend diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 9c4feea3..7b8d5220 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -26,7 +26,7 @@ jobs: ccache- - name: Setup ccache - run: docker-compose run --rm service_template-container bash -c 'ccache -M 2.0GB && ccache -s' + run: docker-compose run --rm Timetable-VSU-backend-container bash -c 'ccache -M 2.0GB && ccache -s' - name: Cmake run: make docker-cmake-release diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dad5d34..e7b34435 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.12) -project(service_template CXX) +project(Timetable-VSU-backend CXX) include(third_party/userver/cmake/SetupEnvironment.cmake) include(GNUInstallDirs) diff --git a/Makefile b/Makefile index e6a96841..b95fb0bd 100644 --- a/Makefile +++ b/Makefile @@ -32,20 +32,20 @@ cmake-debug cmake-release: cmake-%: build_%/Makefile # Build using cmake .PHONY: build-debug build-release build-debug build-release: build-%: cmake-% - @cmake --build build_$* -j $(NPROCS) --target service_template + @cmake --build build_$* -j $(NPROCS) --target Timetable-VSU-backend # Test .PHONY: test-debug test-release test-debug test-release: test-%: build-% - @cmake --build build_$* -j $(NPROCS) --target service_template_unittest - @cmake --build build_$* -j $(NPROCS) --target service_template_benchmark + @cmake --build build_$* -j $(NPROCS) --target Timetable-VSU-backend_unittest + @cmake --build build_$* -j $(NPROCS) --target Timetable-VSU-backend_benchmark @cd build_$* && ((test -t 1 && GTEST_COLOR=1 PYTEST_ADDOPTS="--color=yes" ctest -V) || ctest -V) @pep8 tests # Start the service (via testsuite service runner) .PHONY: service-start-debug service-start-release service-start-debug service-start-release: service-start-%: build-% - @cd ./build_$* && $(MAKE) start-service_template + @cd ./build_$* && $(MAKE) start-Timetable-VSU-backend # Cleanup data .PHONY: clean-debug clean-release @@ -63,7 +63,7 @@ dist-clean: .PHONY: install-debug install-release install-debug install-release: install-%: build-% @cd build_$* && \ - cmake --install . -v --component service_template + cmake --install . -v --component Timetable-VSU-backend .PHONY: install install: install-release @@ -77,18 +77,18 @@ format: # Internal hidden targets that are used only in docker environment .PHONY: --in-docker-start-debug --in-docker-start-release --in-docker-start-debug --in-docker-start-release: --in-docker-start-%: install-% - @/home/user/.local/bin/service_template \ - --config /home/user/.local/etc/service_template/static_config.yaml + @/home/user/.local/bin/Timetable-VSU-backend \ + --config /home/user/.local/etc/Timetable-VSU-backend/static_config.yaml # Build and run service in docker environment .PHONY: docker-start-service-debug docker-start-service-release docker-start-service-debug docker-start-service-release: docker-start-service-%: - @docker-compose run -p 8080:8080 --rm service_template-container $(MAKE) -- --in-docker-start-$* + @docker-compose run -p 8080:8080 --rm Timetable-VSU-backend-container $(MAKE) -- --in-docker-start-$* # Start specific target in docker environment .PHONY: docker-cmake-debug docker-build-debug docker-test-debug docker-clean-debug docker-install-debug docker-cmake-release docker-build-release docker-test-release docker-clean-release docker-install-release docker-cmake-debug docker-build-debug docker-test-debug docker-clean-debug docker-install-debug docker-cmake-release docker-build-release docker-test-release docker-clean-release docker-install-release: docker-%: - docker-compose run --rm service_template-container $(MAKE) $* + docker-compose run --rm Timetable-VSU-backend-container $(MAKE) $* # Stop docker container and cleanup data .PHONY: docker-clean-data diff --git a/docker-compose.yml b/docker-compose.yml index 90d56f04..b4b29ab8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,14 @@ version: "2.3" services: - service_template-container: + Timetable-VSU-backend-container: image: ghcr.io/userver-framework/docker-userver-build-base:v1a privileged: true network_mode: bridge environment: - PREFIX=${PREFIX:-~/.local} - CC - - CCACHE_DIR=/service_template/.ccache + - CCACHE_DIR=/Timetable-VSU-backend/.ccache - CCACHE_HASHDIR - CCACHE_NOHASHDIR - CCACHE_PREFIX @@ -18,10 +18,10 @@ services: - CXX - MAKE_OPTS volumes: - - .:/service_template:rw + - .:/Timetable-VSU-backend:rw - ./third_party/userver/tools/docker:/tools:ro ports: - 8080:8080 - working_dir: /service_template + working_dir: /Timetable-VSU-backend entrypoint: - /tools/run_as_user.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ddefe49c..3766cacf 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,12 +8,12 @@ else() endif() userver_testsuite_add( - SERVICE_TARGET service_template + SERVICE_TARGET Timetable-VSU-backend REQUIREMENTS ${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PYTEST_ARGS --service-config=${CMAKE_SOURCE_DIR}/configs/static_config.yaml - --service-binary=${CMAKE_BINARY_DIR}/service_template + --service-binary=${CMAKE_BINARY_DIR}/Timetable-VSU-backend --config-fallback=${CMAKE_SOURCE_DIR}/configs/dynamic_config_fallback.json ${PYTEST_ARGS_CONFIG_VARS} )