-
Notifications
You must be signed in to change notification settings - Fork 145
60 lines (59 loc) · 1.85 KB
/
pytest.yaml
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
name: Test
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
workflow_call:
workflow_dispatch: {}
jobs:
pytest:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
python_version:
- "3.9"
install_version:
- "[all]"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Setup
run: |
set -ex
python -m pip install --upgrade pip wheel
python -m pip install -e .${{ matrix.install_version }}
- name: Run Tests
# TODO: stop using pytest-split and remove low coverage requirement once C++ shared mem impl is done!
# Jira link for above: https://mosaicml.atlassian.net/browse/STR-107
id: tests
run: |
set -ex
pytest --splits 11 --group 1 --cov-fail-under=10
pytest --splits 11 --group 2 --cov-fail-under=10
pytest --splits 11 --group 3 --cov-fail-under=10
pytest --splits 11 --group 4 --cov-fail-under=10
pytest --splits 11 --group 5 --cov-fail-under=10
pytest --splits 11 --group 6 --cov-fail-under=10
pytest --splits 11 --group 7 --cov-fail-under=10
pytest --splits 11 --group 8 --cov-fail-under=10
pytest --splits 11 --group 9 --cov-fail-under=10
pytest --splits 11 --group 10 --cov-fail-under=10
pytest --splits 11 --group 11 --cov-fail-under=10