File: test_python.yaml

package info (click to toggle)
exhale 0.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,816 kB
  • sloc: python: 9,048; cpp: 1,260; javascript: 915; f90: 29; ansic: 18; makefile: 16
file content (110 lines) | stat: -rw-r--r-- 4,713 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Python

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

# Cancel previous CI runs when new commits are added to a PR.
concurrency:
  group: ${{ github.head_ref || github.run_id }}-python
  cancel-in-progress: true

jobs:
  build:
    # NOTE: runner strategy is to split across os and python version, but test multiple
    # sphinx versions on a single runner.  So do not add a matrix.sphinx-version.
    name: ${{ matrix.os }} / ${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: true
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
    steps:
      - uses: actions/checkout@v4
      ##################################################################################
      - name: Install Doxygen (macOS)
        if: contains(matrix.os, 'macos')
        run: |
          HOMEBREW_NO_AUTO_UPDATE=1 brew install doxygen
      - name: Install Doxygen (Ubuntu)
        if: contains(matrix.os, 'ubuntu')
        run: |
          sudo apt-get install -y doxygen
      - name: Install Doxygen (Windows)
        if: contains(matrix.os, 'windows')
        uses: ssciwr/doxygen-install@v1
          with:
          version: "1.9.6"
      ##################################################################################
      - name: Doxygen Version Dump
        run: doxygen --version
      ##################################################################################
      - name: Use Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install Python Tools
        run: |
          pip install tox codecov coverage
      # Sphinx 4.3.2 ###################################################################
      - name: Test Python ${{ matrix.python-version }} / sphinx==4.3.2
        env:
          # NOTE: this is the current minimum supported.
          SPHINX_VERSION: '==4.3.2'
        run: |
          tox -e py -- --cov-report xml:coverage.xml --cov
      - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx==4.3.2
        run: |
          codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx4.3.2"
      # Don't let code coverage utilities share anything, force clean it all.
      - name: Cleanup Python ${{ matrix.python-version }} Testing / Coverage Artifacts
        run: |
          mv .gitignore nolongerignored
          git clean -n
          git clean -f
          git reset --hard
      # Sphinx 5.x #####################################################################
      - name: Test Python ${{ matrix.python-version }} / sphinx 5.x
        env:
          # Test sphinx 5.x.
          SPHINX_VERSION: '>=5,<6'
        run: |
          tox -e py -- --cov-report xml:coverage.xml --cov
      - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 5.x
        run: |
          codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx5.x"
      # Don't let code coverage utilities share anything, force clean it all.
      - name: Cleanup Python ${{ matrix.python-version }} Testing / Coverage Artifacts
        run: |
          mv .gitignore nolongerignored
          git clean -n
          git clean -f
          git reset --hard
      # Sphinx 6.x #####################################################################
      - name: Test Python ${{ matrix.python-version }} / sphinx 6.x
        env:
          # Test sphinx 6.x.
          SPHINX_VERSION: '>=6,<7'
        run: |
          tox -e py -- --cov-report xml:coverage.xml --cov
      - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 6.x
        run: |
          codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx6.x"
      # Sphinx 7.x #####################################################################
      - name: Test Python ${{ matrix.python-version }} / sphinx 7.x
        env:
          # Test sphinx 7.x.
          # TODO: breathe does not currently support later sphinx.
          # https://github.com/svenevs/exhale/issues/203#issuecomment-1773060684
          SPHINX_VERSION: '>=7,<7.2'
        run: |
          tox -e py -- --cov-report xml:coverage.xml --cov
      - name: Upload Code Coverage for Python ${{ matrix.python-version }} / sphinx 7.x
        run: |
          codecov --required -X gcov -f coverage.xml --name "[GHA] ${{ matrix.os }}-py${{ matrix.python-version }}-sphinx7.x"