-
Notifications
You must be signed in to change notification settings - Fork 660
39 lines (35 loc) · 1.13 KB
/
base_test_workflow.yml
File metadata and controls
39 lines (35 loc) · 1.13 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
name: base_test_workflow
on:
workflow_call:
inputs:
module-to-test:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.8"
pytorch-version: "1.6"
torchvision-version: "0.7"
- python-version: "3.9"
pytorch-version: "2.5"
torchvision-version: "0.20"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .[with-hooks-cpu]
pip install torch==${{ matrix.pytorch-version }} torchvision==${{ matrix.torchvision-version }} --force-reinstall
pip install --upgrade protobuf==3.20.1
pip install six
pip install packaging
- name: Run unit tests
run: |
TEST_DTYPES=float32,float64 TEST_DEVICE=cpu WITH_COLLECT_STATS=${{ matrix.with-collect-stats }} python -m unittest discover -t . -s tests/${{ inputs.module-to-test }}