4040 uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4141 with :
4242 cache-suffix : ${{ github.workflow }}-${{ matrix.python-version }}
43+ enable-cache : ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }}
4344 - name : Mark workspace safe for git (3.6/3.7 container)
4445 # needed to make git rev-parse work in the containers
4546 # subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
4849 - name : Setup Test Env
4950 run : |
5051 uv sync
51- - name : Erase coverage
52- run : |
53- uv run coverage erase
5452 - name : Test langchain-base
5553 run : |
5654 set -x # print commands that are executed
@@ -63,18 +61,45 @@ jobs:
6361 run : |
6462 set -x # print commands that are executed
6563 ./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph"
66- - name : Generate coverage XML
64+ - name : Upload coverage data
6765 if : ${{ !cancelled() }}
66+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
67+ with :
68+ name : coverage-ai_workflow-${{ matrix.python-version }}
69+ # .coverage-* / .junitxml-* are dotfiles, excluded by default
70+ include-hidden-files : true
71+ path : |
72+ .coverage-sentry-*
73+ .junitxml-*
74+ if-no-files-found : ' ignore'
75+ retention-days : 1
76+ upload-coverage-ai_workflow :
77+ name : Upload AI Workflow coverage
78+ needs : test-ai_workflow
79+ # Run even if some test jobs failed, to report partial coverage
80+ if : ${{ !cancelled() }}
81+ runs-on : ubuntu-22.04
82+ steps :
83+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
84+ - name : Install uv
85+ uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
86+ - name : Download coverage data
87+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
88+ with :
89+ pattern : coverage-ai_workflow-*
90+ merge-multiple : true
91+ - name : Combine coverage and generate XML
6892 run : |
93+ uv sync
6994 uv run coverage combine .coverage-sentry-*
7095 uv run coverage xml
7196 - name : Parse and Upload Coverage
72- if : ${{ !cancelled() }}
7397 uses : getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
7498 with :
7599 token : ${{ secrets.GITHUB_TOKEN }}
76100 files : coverage.xml
77- junit-xml-pattern : .junitxml
101+ flags : ai_workflow
102+ junit-xml-pattern : .junitxml-*
78103 base-branch : master
79104 verbose : true
80105 check_required_tests :
0 commit comments