From 481dfb35dd130c24ca1a8616283b897ff5babc1e Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:48:21 +0700 Subject: [PATCH] fix: ci github ratelimit (#1649) Co-authored-by: Hien To --- .github/workflows/cortex-cpp-quality-gate.yml | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cortex-cpp-quality-gate.yml b/.github/workflows/cortex-cpp-quality-gate.yml index 90b394f87..92852bb93 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 setup config + # run: | + # rm ~/.cortexrc + # cd engine + # echo "huggingFaceToken: ${{ secrets.HUGGINGFACE_TOKEN_READ }}" > ~/.cortexrc + # echo "gitHubToken: ${{ secrets.PAT_SERVICE_ACCOUNT }}" >> ~/.cortexrc + # echo "apiServerPort: 3928" >> ~/.cortexrc + # ./build/cortex + # cat ~/.cortexrc + - name: Run unit tests run: | cd engine make run-unit-tests - - name: Run setup config for macos - if: runner.os == 'macOS' - run: | - cd engine - ./build/cortex --version - sed -i '' 's/huggingFaceToken: ""/huggingFaceToken: "${{ secrets.HUGGINGFACE_TOKEN_READ }}"/' ~/.cortexrc - - - 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: |