-
Notifications
You must be signed in to change notification settings - Fork 311
69 lines (61 loc) · 1.63 KB
/
build-and-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
name: Build and Test Workflow
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests-and-coverage:
name: Tests with latest BoTorch
uses: ./.github/workflows/reusable_test.yml
with:
pinned_botorch: false
secrets: inherit
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
# Pin ufmt deps so they match intermal pyfmt.
run: |
pip install -r requirements-fmt.txt
pip install flake8
- name: ufmt
run: |
ufmt diff .
- name: Flake8
# run even if previous step (ufmt) failed
if: ${{ always() }}
run: |
flake8
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
env:
ALLOW_BOTORCH_LATEST: true
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
# use latest Botorch
pip install git+https://github.com/cornellius-gp/gpytorch.git
pip install git+https://github.com/pytorch/botorch.git
pip install -e ".[unittest]"
- name: Validate Sphinx
run: |
python scripts/validate_sphinx.py -p "${pwd}"
- name: Run Sphinx
# run even if previous step (validate Sphinx) failed
if: ${{ always() }}
run: |
# warnings no longer treated as errors.
sphinx-build -T --keep-going sphinx/source sphinx/build