diff --git a/.github/workflows/cortex-cpp-quality-gate.yml b/.github/workflows/cortex-cpp-quality-gate.yml index 90b394f87..ceb1eb08c 100644 --- a/.github/workflows/cortex-cpp-quality-gate.yml +++ b/.github/workflows/cortex-cpp-quality-gate.yml @@ -97,25 +97,30 @@ jobs: cd engine make build CMAKE_EXTRA_FLAGS="${{ matrix.cmake-flags }}" BUILD_DEPS_CMAKE_EXTRA_FLAGS="${{ matrix.build-deps-cmake-flags }}" - - name: Run unit tests + - name: Run setup config run: | + rm ~/.cortexrc cd engine - make run-unit-tests + echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.cortexrc + echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc + echo "apiServerPort: 3928" >> ~/.cortexrc + ./build/cortex + cat ~/.cortexrc - - name: Run setup config for macos - if: runner.os == 'macOS' + - name: Run unit tests run: | cd engine - ./build/cortex --version - sed -i '' 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.cortexrc + make run-unit-tests - - name: Run setup config for linux - if: runner.os != 'macOS' - shell: bash + - name: Run setup config run: | + rm ~/.cortexrc cd engine - ./build/cortex --version - sed -i 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.cortexrc + echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.cortexrc + echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc + echo "apiServerPort: 3928" >> ~/.cortexrc + ./build/cortex + cat ~/.cortexrc - name: Run e2e tests if: runner.os != 'Windows' && github.event.pull_request.draft == false @@ -129,7 +134,7 @@ jobs: rm build/cortex-nightly rm build/cortex-beta env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - name: Run e2e tests if: runner.os == 'Windows' && github.event.pull_request.draft == false @@ -143,7 +148,7 @@ jobs: rm build/cortex-nightly.exe rm build/cortex-beta.exe env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - name: Pre-package run: | diff --git a/engine/e2e-test/test_runner.py b/engine/e2e-test/test_runner.py index e93e152e0..fdece0271 100644 --- a/engine/e2e-test/test_runner.py +++ b/engine/e2e-test/test_runner.py @@ -15,7 +15,7 @@ executable_unix_path = "build/cortex" # Timeout -timeout = 5 # secs +timeout = 10 # secs start_server_success_message = "Server started" @@ -74,7 +74,7 @@ def start_server() -> bool: def start_server_nix() -> bool: executable = getExecutablePath() process = subprocess.Popen( - [executable] + ["start", "-p", "3928"], + [executable] + ["--verbose", "start", "-p", "3928"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, @@ -88,6 +88,7 @@ def start_server_nix() -> bool: for stream in readable: line = stream.readline() if line: + print(f"{'STDOUT' if stream == process.stdout else 'STDERR'}: {line.strip()}") if start_server_success_message in line: # have to wait a bit for server to really up and accept connection print("Server started found, wait 0.3 sec..")