-
Notifications
You must be signed in to change notification settings - Fork 3.6k
73 lines (62 loc) · 1.96 KB
/
testing.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
67
68
69
70
71
72
73
name: Testing PyTorch 2.4
on: # yamllint disable-line rule:truthy
push:
branches:
- master
pull_request:
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
include:
- os: ubuntu-latest
python-version: '3.9'
- os: windows-latest
python-version: '3.9'
- os: macos-14
python-version: '3.10'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 40
# Skip workflow if only certain files have been changed.
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v41
with:
files: |
benchmark/**
conda/**
docker/**
docs/**
examples/**
graphgym/**
README.md
CHANGELOG.md
- name: Setup packages
if: steps.changed-files-specific.outputs.only_changed != 'true'
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Install main package
if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os == 'Windows' }}
run: |
pip install -e .[test]
- name: Install full main package
if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os != 'Windows' }}
run: |
pip install -e .[full,test]
- name: Run tests
if: steps.changed-files-specific.outputs.only_changed != 'true'
timeout-minutes: 10
run: |
pytest --cov --cov-report=xml --durations 10
- name: Upload coverage
if: ${{ steps.changed-files-specific.outputs.only_changed != 'true' && runner.os == 'Linux' }}
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false