55 schedule : [ cron: '12 2 6 * *' ]
66
77jobs :
8- build :
9- name : Build
8+ test-matrix :
109 runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : ./.github/actions/setup
13+ with :
14+ python-version : ' >=3'
1115
12- strategy :
13- matrix :
14- python-version : [3.11, '>=3']
15- include :
16- - python-version : 3.11
17- test-type : lint
18- - python-version : 3.11
19- test-type : docs
16+ - run : pip install -U pip setuptools wheel && pip install -U .
17+ - run : time python -m unittest -v pdoc.test
2018
19+ lint-test-coverage :
20+ runs-on : ubuntu-latest
2121 steps :
22- - name : Set up Python ${{ matrix.python-version }}
23- uses : actions/setup-python@v5
22+ - uses : actions/checkout@v4
2423 with :
25- python-version : ${{ matrix.python-version }}
26-
27- - uses : actions/cache@v4
28- name : Set up caches
24+ fetch-depth : 2 # For codecov
25+ - uses : ./.github/actions/setup
2926 with :
30- path : ~/.cache/pip
31- key : ${{ runner.os }}-py${{ matrix.python-version }}
27+ python-version : 3.11
3228
33- - name : Checkout repo
34- uses : actions/checkout@v4
35- with :
36- fetch-depth : 3
37- - name : Fetch tags
38- run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
39-
40- - name : Install dependencies
41- run : |
42- pip install -U pip setuptools wheel
43- pip install -U .
29+ - run : pip install -U pip setuptools wheel && pip install -U .
4430
4531 - name : Install lint dependencies
46- if : matrix.test-type == 'lint'
4732 run : |
4833 pip install flake8 coverage mypy types-Markdown
4934 sudo apt update && sudo apt-get install \
5035 texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
5136 wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/2.10/pandoc-2.10-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
5237
53- - name : Install docs dependencies
54- if : matrix.test-type == 'docs'
55- run : pip install -e .
38+ - run : find -name '*.md' | xargs .github/lint-markdown.sh
39+ - run : flake8
40+ - run : mypy -p pdoc
41+ - run : time coverage run -m unittest -v pdoc.test
42+ - run : bash <(curl -s https://codecov.io/bash)
43+ - run : coverage report
44+ - run : PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
5645
57- - name : Test w/ Coverage, Lint
58- if : matrix.test-type == 'lint'
59- run : |
60- find -name '*.md' | xargs .github/lint-markdown.sh
61- flake8
62- mypy -p pdoc
63- time coverage run -m unittest -v pdoc.test
64- PDOC_TEST_PANDOC=1 time catchsegv python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
65- bash <(curl -s https://codecov.io/bash)
46+ docs :
47+ runs-on : ubuntu-latest
48+ steps :
49+ - uses : actions/checkout@v4
50+ - uses : ./.github/actions/setup
51+ with :
52+ python-version : 3.11
6653
67- - name : Test
68- if : ' ! matrix.test-type'
69- run : time python -m unittest -v pdoc.test
54+ - name : Fetch tags
55+ run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
7056
71- - name : Test docs
72- if : matrix.test-type == 'docs'
73- run : time doc/build.sh
57+ - run : pip install -U pip setuptools wheel && pip install -e .
58+ - run : time doc/build.sh
0 commit comments