|
57 | 57 | - run: cargo careful t -F python |
58 | 58 | if: matrix.rust-version == 'nightly' |
59 | 59 |
|
60 | | - - uses: codecov/codecov-action@v3 |
| 60 | + - uses: codecov/codecov-action@v4 |
61 | 61 | with: |
62 | 62 | env_vars: RUNS_ON,RUST_VERSION |
63 | 63 | token: ${{ secrets.CODECOV_TOKEN }} |
@@ -103,11 +103,53 @@ jobs: |
103 | 103 |
|
104 | 104 | - run: cargo test --doc |
105 | 105 |
|
106 | | - - uses: codecov/codecov-action@v3 |
| 106 | + - uses: codecov/codecov-action@v4 |
107 | 107 | with: |
108 | 108 | env_vars: RUNS_ON,RUST_VERSION |
109 | 109 | token: ${{ secrets.CODECOV_TOKEN }} |
110 | 110 |
|
| 111 | + test-python: |
| 112 | + name: test jiter-python |
| 113 | + |
| 114 | + runs-on: ubuntu-latest |
| 115 | + |
| 116 | + env: |
| 117 | + RUNS_ON: ubuntu-latest |
| 118 | + |
| 119 | + steps: |
| 120 | + - uses: actions/checkout@v3 |
| 121 | + |
| 122 | + - name: set up python |
| 123 | + uses: actions/setup-python@v4 |
| 124 | + with: |
| 125 | + python-version: '3.12' |
| 126 | + |
| 127 | + - uses: dtolnay/rust-toolchain@stable |
| 128 | + |
| 129 | + - id: cache-rust |
| 130 | + uses: Swatinem/rust-cache@v2 |
| 131 | + |
| 132 | + - run: cargo install rustfilt coverage-prepare |
| 133 | + if: steps.cache-rust.outputs.cache-hit != 'true' |
| 134 | + |
| 135 | + - run: rustup component add llvm-tools-preview |
| 136 | + |
| 137 | + - run: make python-install |
| 138 | + |
| 139 | + - run: pip install -e crates/jiter-python |
| 140 | + env: |
| 141 | + RUSTFLAGS: '-C instrument-coverage' |
| 142 | + |
| 143 | + - run: pytest crates/jiter-python/tests |
| 144 | + env: |
| 145 | + RUST_BACKTRACE: 1 |
| 146 | + |
| 147 | + - run: coverage-prepare lcov $(python -c 'import jiter.jiter;print(jiter.jiter.__file__)') |
| 148 | + |
| 149 | + - uses: codecov/codecov-action@v4 |
| 150 | + with: |
| 151 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 152 | + |
111 | 153 | bench: |
112 | 154 | runs-on: ubuntu-latest |
113 | 155 | steps: |
@@ -504,7 +546,7 @@ jobs: |
504 | 546 | # https://github.com/marketplace/actions/alls-green#why used for branch protection checks |
505 | 547 | check: |
506 | 548 | if: always() |
507 | | - needs: [test-linux, test-macos, bench, fuzz, fuzz-skip, lint] |
| 549 | + needs: [test-linux, test-macos, test-python, bench, fuzz, fuzz-skip, lint] |
508 | 550 | runs-on: ubuntu-latest |
509 | 551 | steps: |
510 | 552 | - name: Decide whether the needed jobs succeeded or failed |
|
0 commit comments