forked from jwilk/ubanner
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (105 loc) · 3.03 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
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
name: CI
on:
- push
- pull_request
jobs:
main:
strategy:
matrix:
include:
- os: debian:10 # buster (Python 3.7, Pycairo 1.16)
- os: debian:11 # bullseye (Python 3.9, Pycairo 1.16)
- os: debian:12 # bookworm (Python 3.11, Pycairo 1.20)
- os: debian:unstable # (Python >= 3.11, Pycairo >= 1.20)
runs-on: ubuntu-latest
container: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: install deps
run: |
printf 'Apt::Install-Recommends "false";\n' | tee -a /etc/apt/apt.conf
apt-get update
apt-get install -y python3-gi-cairo gir1.2-pango-1.0
apt-get install -y make man-db
apt-get install -y perl libio-pty-easy-perl zsh
- name: set up PATH
run: |
PATH="$PATH:$HOME/.local/bin"
echo "$PATH" >> $GITHUB_PATH
- name: check Python version
run: |
python3 --version
- name: run tests
run: |
export LC_ALL=C.UTF-8
mkdir -p .git
make test verbose=1
- name: install
run: |
make install PREFIX=~/.local
- name: check whether the executable was installed correctly
run: |
cd /
command -v ubanner
- name: check whether the man page was installed correctly
run: |
cd /
export MANPATH="$HOME/.local/share/man" MANWIDTH=80
man 1 ubanner | grep -A 10 -w UBANNER
- name: run post-install tests
run: |
mv ubanner ubanner.bak
export LC_ALL=C.UTF-8
export MANPATH="$HOME/.local/share/man"
make test-installed verbose=1
mv ubanner.bak ubanner
static:
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- python-version: '3.6'
os: ubuntu-20.04
- python-version: '3.7'
os: ubuntu-20.04
- python-version: '3.8'
os: ubuntu-20.04
- python-version: '3.9'
os: ubuntu-20.04
- python-version: '3.10'
os: ubuntu-22.04
- python-version: '3.11'
os: ubuntu-22.04
- python-version: '3.12'
os: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
- name: run pydiatra
run: |
python3 -m pip install pydiatra
python3 -m pydiatra -v .
- name: run pyflakes
run: |
python3 -m pip install pyflakes
python3 -m pyflakes .
- name: check README syntax
run: |
python3 -m pip install restructuredtext-lint pygments
rst-lint --level=info --encoding=UTF-8 doc/README
manpage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install deps
run: |
printf 'Apt::Install-Recommends "false";\n' | sudo tee -a /etc/apt/apt.conf
sudo apt-get update
sudo apt-get install mandoc
- name: run mandoc lint
run: |
mandoc -T lint doc/*.1
# vim:ts=2 sts=2 sw=2 et