From ee420a6876b8acd96ce52eccd283934e41d78ad7 Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Fri, 9 Feb 2024 16:18:12 +0100 Subject: [PATCH] Call conan in ci --- .github/workflows/python.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 41b6f893..0d11f617 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,6 +1,15 @@ name: Check 🐍 pkg PROPOSAL. -on: [push] +on: + push: + branches: + - main + tags: + - "**" + pull_request: + +env: + CMAKE_TOOLCHAIN_FILE: build/conan_toolchain.cmake jobs: build: @@ -10,6 +19,7 @@ jobs: include: - os : "ubuntu-latest" - os : "macos-latest" + steps: - uses: actions/checkout@v2 - name: Cache conan @@ -18,11 +28,15 @@ jobs: with: path: ~/.conan key: ${{ runner.os }}-cache-conan-${{ matrix.compiler }}-${{ hashFiles('conanfile.py') }}-key + - name: Install conan run: python3 -m pip install conan + + - name: Get dependencies via conan + run: conan install . -o with_python=True -o with_testing=False --build=missing + - name: Install Python 🐍 distributions 📦 - run: python3 -m pip install . - - name: Install pytest - run: python3 -m pip install pytest + run: python3 -m pip install .[tests] + - name: run pytest run: python3 -m pytest tests/python -v