-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (35 loc) · 1.33 KB
/
ci.yml
File metadata and controls
35 lines (35 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
# Prevent Git from changing LF to CRLF, which affects test fixtures.
- run: git config --global core.autocrlf false
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
key: ${{ matrix.os }}
# https://github.com/Swatinem/rust-cache/issues/93#issuecomment-1321064841
- run: cargo update
- uses: taiki-e/install-action@cargo-llvm-cov
- env:
RUSTFLAGS: -Zon-broken-pipe=kill
run: cargo llvm-cov --lcov --output-path coverage.lcov --no-cfg-coverage-nightly
- if: matrix.os != 'windows-latest'
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
fail_ci_if_error: true
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: pip install .[test]
- run: pytest -W error