-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (50 loc) · 1.49 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- main
jobs:
# Job 1: Linters for Pull Requests
linters:
runs-on: windows-latest
strategy:
matrix:
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -e .[linters] --no-cache-dir
- name: Run interrogate
run: interrogate parallax tests
continue-on-error: true
- name: Run flake8
run: flake8 parallax tests
continue-on-error: true
# Job 2: Build Documentation for Pushes to Main
build-docs:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Step 3: Install dependencies (including Sphinx)
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
# Step 4: Build the documentation
- name: Build Documentation
run: |
sphinx-build -b html docs/source docs/_build
# Fail the workflow if documentation build fails
continue-on-error: false