Skip to content

Pin Conan version to 1.x + Update NPM publish (#393) #555

Pin Conan version to 1.x + Update NPM publish (#393)

Pin Conan version to 1.x + Update NPM publish (#393) #555

Workflow file for this run

name: Backend CI
on:
push:
branches: [ main ]
paths:
- 'backend/**'
- 'api/schema/**'
- '.github/actions/**'
- '.github/workflows/ccpp.yml'
pull_request:
branches: [ main ]
paths:
- 'backend/**'
- 'api/schema/**'
- '.github/actions/**'
- '.github/workflows/ccpp.yml'
env:
CONAN_REMOTE: user-management
jobs:
ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: cache pip data
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: setup conan
uses: ./.github/actions/setup-conan
- name: install cmake
uses: lukka/get-cmake@latest
- name: install lcov
run: |
sudo apt-get install lcov
- name: conan install
working-directory: backend
run: |
conan lock create conanfile.py --version=0.0.0 -pr=debug --lockfile=conan.lock --lockfile-out=build/conan.lock
conan install conanfile.py --lockfile=build/conan.lock -if build
- name: configure
working-directory: backend
run: |
cmake --preset debug -B build -DBUILD_TESTS=ON -DCOVERAGE=ON
- name: build
working-directory: backend
run: cmake --build build/ --target user_tests
- name: coverage
working-directory: backend/build
run: |
make coverage
- uses: codecov/codecov-action@v3
with:
file: backend/build/coverage.info
name: cpp-backend-unit-tests
fail_ci_if_error: true
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: cache pip data
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: setup conan
uses: ./.github/actions/setup-conan
- name: loggin to private remote
run: conan user -p ${{ secrets.JFROG_RTFACT_PASSWORD }} -r $CONAN_REMOTE [email protected]
- name: install cmake
uses: lukka/get-cmake@latest
- name: conan install
working-directory: backend
run: |
conan lock create conanfile.py --version=0.0.0 --lockfile=conan.lock --lockfile-out=build/conan.lock
conan install conanfile.py --lockfile=build/conan.lock -if build
- name: configure
working-directory: backend
run: |
cmake --preset release -B build -DBUILD_TESTS=ON
- name: build
working-directory: backend
run: cmake --build build/
- name: test
working-directory: backend/build
run: ./test/user_tests