-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (116 loc) · 4.01 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: pytest
on:
push:
paths-ignore:
- 'docs/**/*'
- '**/README.*'
- 'LICENSE'
- '.readthedocs.yaml'
- 'mkdocs.yml'
- '.gitignore'
- '.pre-commit-config.yaml'
- 'CITATION.cff'
jobs:
tests-codes-consistency:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-dev.txt
- name: Test with pytest
run: pytest tests/test_codes_consistency.py --doctest-modules --junitxml=junit/tests-codes-consistency-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-tests-codes-consistency-results-${{ matrix.python-version }}
path: junit/tests-codes-consistency-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
tests-torch:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-22.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update && \
sudo apt-get -y install wget unzip \
git software-properties-common \
libgl1-mesa-dev \
libgl1-mesa-glx \
libglew-dev \
libosmesa6-dev patchelf swig
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew install gcc@9
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-torch-dev.txt
- name: Test with pytest
run: pytest tests/test_*_torch.py --doctest-modules --junitxml=junit/tests-torch-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-tests-torch-results-${{ matrix.python-version }}
path: junit/tests-torch-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
tests-tf:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-22.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update && \
sudo apt-get -y install wget unzip \
git software-properties-common \
libgl1-mesa-dev \
libgl1-mesa-glx \
libglew-dev \
libosmesa6-dev patchelf swig
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew install gcc@9
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-tf-dev.txt
- name: Test with pytest
run: pytest tests/test_*_tf.py --doctest-modules --junitxml=junit/tests-tf-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-tests-tf-results-${{ matrix.python-version }}
path: junit/tests-tf-results-${{ matrix.python-version }}.xml
if: ${{ always() }}