forked from jwilk/ubanner
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (85 loc) · 2.35 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
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 perl
- 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
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: run post-install tests
run: |
mv ubanner ubanner.bak
export LC_ALL=C.UTF-8
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: |
pip install pydiatra
python3 -m pydiatra -v .
- name: run pyflakes
run: |
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 README
# vim:ts=2 sts=2 sw=2 et