File: test-docs.yml

package info (click to toggle)
ipyparallel 9.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,388 kB
  • sloc: python: 22,769; javascript: 267; makefile: 29; sh: 28
file content (74 lines) | stat: -rw-r--r-- 2,155 bytes parent folder | download | duplicates (2)
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
name: Test docs

on:
  pull_request:
  push:
    branches-ignore:
      - "dependabot/**"
      - "pre-commit-ci-update-config"
    tags:
      - "**"
  workflow_dispatch:

env:
  # UTF-8 content may be interpreted as ascii and causes errors without this.
  LANG: C.UTF-8
  PYTEST_ADDOPTS: "--verbose --color=yes"

jobs:
  test-docs:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
        with:
          # make rediraffecheckdiff requires git history to compare current
          # commit with the main branch and previous releases.
          fetch-depth: 0

      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"

      - name: Install requirements
        run: |
          pip install -r docs/requirements.txt .

      # readthedocs doesn't halt on warnings,
      # so raise any warnings here
      - name: build docs
        run: |
          cd docs
          make html

      - name: check links
        run: |
          cd docs
          make linkcheck

      # make rediraffecheckdiff compares files for different changesets
      # these diff targets aren't always available
      # - compare with base ref (usually 'main', always on 'origin') for pull requests
      # - only compare with tags when running against main repo
      #   to avoid errors on forks, which often lack tags
      - name: check redirects for this PR
        if: github.event_name == 'pull_request'
        run: |
          cd docs
          export REDIRAFFE_BRANCH=origin/${{ github.base_ref }}
          make rediraffecheckdiff

      # this should check currently published 'stable' links for redirects
      - name: check redirects since last release
        if: github.repository == 'ipython/ipyparallel'
        run: |
          cd docs
          export REDIRAFFE_BRANCH=$(git describe --tags --abbrev=0)
          make rediraffecheckdiff

      # longer-term redirect check (fixed version) for older links
      - name: check redirects since 8.6.0
        if: github.repository == 'ipython/ipyparallel'
        run: |
          cd docs
          export REDIRAFFE_BRANCH=8.6.0
          make rediraffecheckdiff