@@ -11,7 +11,6 @@ concurrency:
1111 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1212 cancel-in-progress : true
1313
14-
1514jobs :
1615 build :
1716 runs-on : ubuntu-latest
@@ -26,50 +25,49 @@ jobs:
2625 with :
2726 # Install a specific version of uv.
2827 version : " 0.5.1"
29- # TODO: enable cache when kirin open-source
30- # enable-cache: true
31- # cache-dependency-glob: "uv.lock"
28+ enable-cache : true
29+ cache-dependency-glob : " uv.lock"
3230 - name : Set up Python ${{ matrix.python-version }}
3331 run : uv python install ${{ matrix.python-version }}
3432 - name : Install the project
35- run : uv sync --all-extras --dev --index="https://${{ secrets.JFROG_USER}}:${{ secrets.JFROG_TOKEN }}@quera.jfrog.io/artifactory/api/pypi/kirin/simple/" --index="https://${{ secrets.JFROG_USER}}:${{ secrets.JFROG_TOKEN }}@quera.jfrog.io/artifactory/api/pypi/quera-pypi-algo/simple/"
33+ run : uv sync --all-extras --dev
3634 - name : Run tests
3735 # For example, using `pytest`
3836 run : uv run just coverage
39- # - name: Upload Coverage to Codecov
40- # uses: codecov/codecov-action@v4
41- # with:
42- # files: coverage.xml # optional
43- # fail_ci_if_error: true # optional (default = false)
44- # verbose: true # optional (default = false)
45- # token: ${{ secrets.CODECOV_TOKEN }} # required
46- # - name: Archive code coverage results
47- # if: matrix.python-version == '3.12'
48- # uses: actions/upload-artifact@v4
49- # with:
50- # name: code-coverage-report
51- # path: coverage.xml
52- # retention-days: 2
53- # post:
54- # runs-on: ubuntu-latest
55- # needs: build
56- # if: github.event.pull_request
57- # steps:
58- # - uses: actions/checkout@v4
59- # - name: download covearge
60- # uses: actions/download-artifact@v4
61- # with:
62- # name: code-coverage-report
63- # - name: check coverage
64- # run: |
65- # if [ -f coverage.xml ]; then
66- # echo "Coverage file exists"
67- # else
68- # echo "Coverage file does not exist"
69- # exit 1
70- # fi
71- # - name: post covearge
72- 73- # with:
74- # coverageFile: coverage.xml
75- # token: ${{ secrets.GITHUB_TOKEN }}
37+ - name : Upload Coverage to Codecov
38+ uses : codecov/codecov-action@v5
39+ with :
40+ files : coverage.xml # optional
41+ fail_ci_if_error : true # optional (default = false)
42+ verbose : true # optional (default = false)
43+ token : ${{ secrets.CODECOV_TOKEN }} # required
44+ - name : Archive code coverage results
45+ if : matrix.python-version == '3.12'
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : code-coverage-report
49+ path : coverage.xml
50+ retention-days : 2
51+ post :
52+ runs-on : ubuntu-latest
53+ needs : build
54+ if : github.event.pull_request
55+ steps :
56+ - uses : actions/checkout@v4
57+ - name : download coverage
58+ uses : actions/download-artifact@v4
59+ with :
60+ name : code-coverage-report
61+ - name : check coverage
62+ run : |
63+ if [ -f coverage.xml ]; then
64+ echo "Coverage file exists"
65+ else
66+ echo "Coverage file does not exist"
67+ exit 1
68+ fi
69+ - name : post coverage
70+ 71+ with :
72+ coverageFile : coverage.xml
73+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments