-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.18 KB
/
adhoc-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
name: Adhoc tests
on:
workflow_dispatch:
inputs:
path:
description:
"Path of the notebook/script to test, relative to the repo root.
For scripts, this should be the path of the `scripts` folder"
required: true
type: string
python_version:
description: "Python version"
required: true
default: "3.10"
type: choice
options:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
os:
description: "Windows/Ubuntu/MacOS"
required: true
default: "ubuntu-latest"
type: choice
options:
- ubuntu-latest
- macos-13
- windows-latest
env:
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: utf-8
NEPTUNE_PROJECT: ${{ vars.NEPTUNE_PROJECT }}
jobs:
run-tests:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ inputs.python_version }}
cache: "pip"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install setuptools for python>=3.12
if: inputs.python_version >= 3.12
run: pip install -U setuptools
- name: Install libomp on MacOS
if: inputs.os == 'macos-13'
run: brew install libomp
- name: Test scripts
if: endsWith(inputs.path, 'scripts')
uses: nick-fields/retry@v3
env:
NEPTUNE_API_TOKEN: ${{ secrets.NEPTUNE_API_TOKEN }}
with:
timeout_minutes: 60
max_attempts: 2
command: |
cd ${{ inputs.path }}
bash run_examples.sh
- name: Test notebooks
if: endsWith(inputs.path, '.ipynb')
uses: nick-fields/retry@v3
env:
NEPTUNE_API_TOKEN: ${{ secrets.NEPTUNE_API_TOKEN }}
with:
timeout_minutes: 60
max_attempts: 2
command: |
ipython ${{ inputs.path }}