-
Notifications
You must be signed in to change notification settings - Fork 44
84 lines (69 loc) · 2.44 KB
/
run-unittests-py39-py310.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
name: "[Py3.9][Py3.10] - tests/unitary/**"
on:
workflow_dispatch:
pull_request:
paths:
- "ads/**"
- pyproject.toml
- "**requirements.txt"
- ".github/workflows/run-unittests*.yml"
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
jobs:
test:
name: python ${{ matrix.python-version }}, ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
test-path: ["tests/unitary/with_extras tests/unitary/default_setup", "tests/unitary/with_extras/model"]
include:
- test-path: "tests/unitary/with_extras tests/unitary/default_setup"
ignore-path: "--ignore tests/unitary/with_extras/model --ignore tests/unitary/with_extras/feature_store"
name: "unitary"
- test-path: "tests/unitary/with_extras/model"
name: "model"
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/create-more-space
name: "Create more disk space"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
pyproject.toml
"**requirements.txt"
- uses: ./.github/workflows/set-dummy-conf
name: "Test config setup"
- name: "Test env setup"
timeout-minutes: 20
shell: bash
run: |
set -x # print commands that are executed
sudo apt-get install libkrb5-dev graphviz
$CONDA/bin/conda init
source /home/runner/.bashrc
pip install -r dev-requirements.txt
- name: "Run unitary tests folder with maximum ADS dependencies"
timeout-minutes: 60
shell: bash
env:
CONDA_PREFIX: /usr/share/miniconda
run: |
set -x # print commands that are executed
# Run tests
python -m pytest -v -p no:warnings --durations=5 \
-n auto --dist loadfile \
${{ matrix.test-path }} ${{ matrix.ignore-path }}