-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.69 KB
/
Copy pathci.yml
File metadata and controls
61 lines (56 loc) · 1.69 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
60
61
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
run_gpu:
description: 'Run GPU smoke tests on a GPU-enabled self-hosted runner'
required: false
default: 'false'
env:
PYTHON_VERSION: '3.14'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install ruff
run: pip install ruff
- name: Lint
run: ruff check .
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt pytest-cov
- name: Run tests
run: python -m pytest -q --cov=algorithms --cov-report=term-missing
gpu-smoke:
# Runs only when manually dispatched with run_gpu=true
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_gpu == 'true' }}
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies (GPU)
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt pytest-cov
- name: Run GPU smoke tests
run: python -m pytest tests/test_gpu_kernels.py tests/test_numba_spmv.py tests/test_radix_cupy.py -v