-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 1.93 KB
/
test.yml
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
62
63
64
65
66
# SPDX-FileCopyrightText: Enno Hermann
#
# SPDX-License-Identifier: MIT
name: Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
numpy-version: "--with numpy==1.21.6"
torch-version: "--with torch==1.12.1"
- python-version: "3.10"
numpy-version: "--with numpy==1.21.6"
torch-version: "--with torch==1.12.1"
- python-version: "3.11"
numpy-version: "--with numpy==1.24.4"
torch-version: "--with torch==2.1.1"
- python-version: "3.12"
numpy-version: "--with numpy==1.26.4"
torch-version: "--with torch==2.2.2"
- python-version: "3.13"
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Tests
run: |
uv run -v --python=${{ matrix.python-version }} --extra cpu \
${{ matrix.numpy-version }} ${{ matrix.torch-version}} \
coverage run --parallel
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: coverage-data-${{ matrix.python-version }}
path: .coverage.*
if-no-files-found: ignore
coverage:
if: always()
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- uses: actions/download-artifact@v4
with:
pattern: coverage-data-*
merge-multiple: true
- name: Combine coverage
run: |
uv python install 3.12
uvx coverage combine
uvx coverage html --skip-covered --skip-empty
uvx coverage report --format=markdown >> $GITHUB_STEP_SUMMARY