test: Add RAG and other Python UT coverage to the codecov report #617
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: unit-tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [main] | |
paths-ignore: ["docs/**", "**.md", "**.mdx", "**.png", "**.jpg"] | |
pull_request: | |
branches: [main, release-**] | |
paths-ignore: ["docs/**", "**.md", "**.mdx", "**.png", "**.jpg"] | |
permissions: | |
contents: read | |
packages: write | |
env: | |
GO_VERSION: "1.22" | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
environment: unit-tests | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Check out the code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12.7 | |
- name: Generate APIs | |
run: | | |
make generate | |
- name: Run unit tests & Generate coverage | |
run: | | |
make unit-test | |
make tuning-metrics-server-test | |
- name: Run inference api e2e tests | |
run: | | |
DEVICE=cpu make inference-api-e2e | |
- name: Generate Python coverage Report | |
run: | | |
pip install pytest-cov | |
pytest --cov presets/workspace | |
- name: Upload Codecov report | |
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 | |
with: | |
## Comma-separated list of files to upload | |
files: ./coverage.txt | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |