From 5f1990bdedd6cd031bb1cd42d510846d73e43b95 Mon Sep 17 00:00:00 2001 From: Sixian Yi Date: Thu, 9 Jan 2025 15:00:21 -0800 Subject: [PATCH] GH CI test config --- .github/workflows/ci-test.yml | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/ci-test.yml diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000000..62cf1d6907 --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,63 @@ +name: Integration-test + +on: + workflow_dispatch: + push: + +run-name: + "CI test" + +env: + TESTS_PATH: "${{ github.workspace }}/llama_stack/providers/tests" + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Set up provider env + run: | + echo ${{ secrets.TOGETHER_API_KEY }} + + - name: "Checkout 'meta-llama/llama-stack' repository" + id: checkout_repo + uses: actions/checkout@v4 + # with: + # ref: ${{ inputs.branch }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade pytest + pip install --upgrade pytest-html + + + run_tests: + name: Run tests + runs-on: ubuntu-latest + needs: + build + steps: + - name: + # env: + # FIREWORKS_API_KEY=${{ secrets.FIREWORKS_API_KEY }} + # TOGETHER_API_KEY=${{ secrets.TOGETHER_API_KEY }} + run: | + export FIREWORKS_API_KEY=${{ secrets.FIREWORKS_API_KEY }} + export TOGETHER_API_KEY=${{ secrets.TOGETHER_API_KEY }} + pytest ${TESTS_PATH}/. --html=report.html --config=ci_test_config.yaml + + - name: Upload pytest test results + uses: actions/upload-artifact@v4 + with: + name: report.html + path: report.html + # Use always() to always run this step to publish test results when there are test failures + if: ${{ always() }}