diff --git a/.github/actions/setup-conan/action.yml b/.github/actions/setup-conan/action.yml index 0f69629f..a6f5c88e 100644 --- a/.github/actions/setup-conan/action.yml +++ b/.github/actions/setup-conan/action.yml @@ -3,7 +3,7 @@ description: "Install and configure the conan client for use in the user-managem runs: using: "composite" steps: - - run: python3 -m pip install "conan<2" --upgrade + - run: python3 -m pip install -r backend/requirements.txt shell: bash - run: conan config init --force shell: bash diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index d4905983..d5fd30c2 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -70,6 +70,7 @@ jobs: with: file: backend/build/coverage.info name: cpp-backend-unit-tests + flags: backend-unit-tests fail_ci_if_error: true macos: diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index 772af764..a1580d84 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -293,6 +293,7 @@ jobs: with: file: frontend/coverage/lcov.info name: react-frontend-unit-tests + flags: frontend-unit-tests fail_ci_if_error: true frontend: diff --git a/backend/Dockerfile.build b/backend/Dockerfile.build index 8d6f5242..7c2b3639 100644 --- a/backend/Dockerfile.build +++ b/backend/Dockerfile.build @@ -1,6 +1,8 @@ FROM alpine:3.16 +ADD backend/requirements.txt /tmp + RUN apk update && apk add --no-cache \ gcc g++ build-base linux-headers \ cmake bash libstdc++ perl tar git \ - py-pip && pip install "conan<2" + py-pip && pip install -r /tmp/requirements.txt diff --git a/backend/conanfile.py b/backend/conanfile.py index c8292423..06b83b91 100644 --- a/backend/conanfile.py +++ b/backend/conanfile.py @@ -11,9 +11,10 @@ class UserManagementConanFile(ConanFile): license = "MIT" url = "https://github.com/prince-chrismc/user-management" description = "An open-source application delivering a responsive user management experience." + package_type = "application" settings = "os", "compiler", "build_type", "arch" options = {"logging": ["console", "syslog"]} - default_options = {"logging": "syslog", "restinio:with_openssl": True} + default_options = {"logging": "syslog", "restinio/*:with_openssl": True} def layout(self): # Describe mono repo structure @@ -56,16 +57,9 @@ def build(self): cmake.build() def package(self): - self.copy("*.hpp", src=".") - self.copy("*.lib", dst="lib", keep_path=False) - self.copy("*.dll", dst="bin", keep_path=False) - self.copy("*.so", dst="lib", keep_path=False) - self.copy("*.dylib", dst="lib", keep_path=False) - self.copy("*.a", dst="lib", keep_path=False) - self.copy("*user_database_app", dst="bin", keep_path=False) - - def package_info(self): - self.cpp_info.libs = ["user-management"] + # TODO(prince-chrismc): Revisit requirements when we look into deploying + copy(self, "*.hpp", src=path.join(self.source_folder, "include"), dst=path.join(self.package_folder, "include")) + copy(self, "*user_database_app", src=path.join(self.build_folder, "src"), dst=path.join(self.package_folder, "bin"), keep_path=False) def deploy(self): self.copy("user_database_app", src="bin", dst="bin") diff --git a/backend/readme.md b/backend/readme.md index ecbcba26..af29fea6 100644 --- a/backend/readme.md +++ b/backend/readme.md @@ -6,7 +6,7 @@ In order to get started you will need to satisfy the following requirements: - C++14 capable build environment - CMake v3.19 (recommend v3.23 to take advantage of presets when working locally) -- Conan v1.51 (but less then 2) `pip install "conan<2"` +- Conan v1.51 (but less then 2) `pip install -r requirements.txt` ### Conan Configuration diff --git a/backend/requirements.txt b/backend/requirements.txt index 8d13ef98..6de1e867 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,2 +1,2 @@ -conan>=1.51.0 +conan>=1.51.0,<2 cmake-format>=0.6 diff --git a/readme.md b/readme.md index 76af44bc..83f9102b 100644 --- a/readme.md +++ b/readme.md @@ -23,5 +23,5 @@ This repository contains a distributed cloud native application comprised of two | Component | Build | Coverage | | --- | --- | --- | -| Back-end | [![C++ CI](https://github.com/prince-chrismc/user-management/workflows/C++%20CI/badge.svg)](https://github.com/prince-chrismc/user-management/actions?query=workflow%3A%22C%2B%2B+CI%22)| [![Coverage Status](https://coveralls.io/repos/github/prince-chrismc/user-management/badge.svg?branch=main)](https://coveralls.io/github/prince-chrismc/user-management?branch=main) | +| Back-end | [![C++ CI](https://github.com/prince-chrismc/user-management/workflows/C++%20CI/badge.svg)](https://github.com/prince-chrismc/user-management/actions?query=workflow%3A%22C%2B%2B+CI%22)| [![codecov](https://img.shields.io/codecov/c/github/prince-chrismc/user-management)](https://codecov.io/gh/prince-chrismc/user-management) | | Front-end | [![Node.js CI](https://github.com/prince-chrismc/user-management/workflows/Node.js%20CI/badge.svg)](https://github.com/prince-chrismc/user-management/actions?query=workflow%3A%22Node.js+CI%22) | [![codecov](https://img.shields.io/codecov/c/github/prince-chrismc/user-management)](https://codecov.io/gh/prince-chrismc/user-management) |