-
Notifications
You must be signed in to change notification settings - Fork 120
59 lines (48 loc) · 1.46 KB
/
ci.yaml
File metadata and controls
59 lines (48 loc) · 1.46 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Run tests and upload coverage
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Run tests with pytest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Create virtual environment
run: uv venv .venv
- name: Add venv to PATH (Linux/macOS)
if: runner.os != 'Windows'
run: |
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Add venv to PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
"VIRTUAL_ENV=.venv" >> $env:GITHUB_ENV
"$pwd\.venv\Scripts" >> $env:GITHUB_PATH
- name: Install dependencies
run: make install-no-pre-commit
- name: Run tests under coverage
shell: bash
run: |
coverage run --source=model2vec -m pytest
coverage report
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}