-
Notifications
You must be signed in to change notification settings - Fork 114
87 lines (83 loc) · 2.7 KB
/
pythonpackage.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
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# see setup.py for supported versions
python-version:
- 3.7
- 3.8
- 3.9
- "3.10"
- 3.11
- 3.12
- pypy3.10
# should test sparingly across API breaking boundaries
pandoc-version:
# - 2.0.6
# - 2.1.3
# - 2.2.3.2
# - 2.3.1
# - 2.4
# - 2.5
# - 2.6
# panflute only support at or above this
# - 2.7.3
# no major API change between 2.7 to 2.9
# - 2.8.1
# - 2.9.2.1
# as of writing, panflute only support pandoc<= 2.9. But GitHub workflow does not support "allow failure" yet. See https://github.com/actions/toolkit/issues/399
# 2.10 has breaking change
# - 2.10.1
# 2.11 has minor breaking change, fixing some quirks in 2.10
# - 2.11.0.4
# - 2.11.4
# - 2.12
- latest
include:
- os: ubuntu-20.04
python-version: 3.5
pandoc-version: latest
- os: ubuntu-20.04
python-version: 3.6
pandoc-version: latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install examples' dependencies
run: sudo apt update && sudo apt install abcm2ps graphviz graphviz-dev texlive-full
- name: Install dependencies—pip
# pygraphviz for graphviz.py
run: |
python -m pip install -U setuptools pygraphviz
python -m pip install .
- name: set pandoc release version
run: |
version=$([[ "${{ matrix.pandoc-version }}" == "latest" ]] && echo "latest" || echo "tags/${{ matrix.pandoc-version }}")
echo "PANDOC_VERSION=$version" >> $GITHUB_ENV
- name: Fetch dependencies—pandoc
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "jgm/pandoc"
version: ${{ env.PANDOC_VERSION }}
file: ".*-amd64\\.deb"
target: "deb/"
regex: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies—pandoc
run: |
# pandoc
sudo dpkg -i deb/*.deb
- name: Tests
run: cd examples; make -j4