-
-
Notifications
You must be signed in to change notification settings - Fork 146
62 lines (53 loc) · 1.9 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
57
58
59
60
61
62
name: CI
on:
push: { branches: [master] }
pull_request: { branches: [master] }
schedule: [ cron: '12 2 6 * *' ]
jobs:
test-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
python-version: '>=3'
- run: pip install -U pip setuptools wheel && pip install -U .
- run: time python -m unittest -v pdoc.test
lint-test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # For codecov
- uses: ./.github/actions/setup
with:
python-version: 3.11
- run: pip install -U pip setuptools wheel && pip install -U .
- name: Install lint dependencies
run: |
pip install flake8 coverage mypy types-Markdown
sudo apt update && sudo apt-get install \
texlive-xetex lmodern texlive-fonts-recommended # test_pdf_pandoc
wget -O/tmp/pandoc.deb https://github.com/jgm/pandoc/releases/download/3.1.12.2/pandoc-3.1.12.2-1-amd64.deb && sudo dpkg -i /tmp/pandoc.deb
- run: find -name '*.md' | xargs .github/lint-markdown.sh
- run: flake8 pdoc setup.py
- run: mypy -p pdoc
- run: time coverage run -m unittest -v pdoc.test
- run: bash <(curl -s https://codecov.io/bash)
- run: coverage report
- run: PDOC_TEST_PANDOC=1 time python -m unittest -v pdoc.test.CliTest.test_pdf_pandoc
- uses: actions/upload-artifact@v3
with:
name: Pdoc Documentation.pdf
path: /tmp/pdoc.pdf
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
python-version: 3.11
- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: pip install -U pip setuptools wheel && pip install -e .
- run: time doc/build.sh