-
-
Notifications
You must be signed in to change notification settings - Fork 143
115 lines (110 loc) · 3.3 KB
/
Copy pathci.yml
File metadata and controls
115 lines (110 loc) · 3.3 KB
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
110
111
112
113
114
115
name: CI
on: [pull_request]
jobs:
beefore:
name: Pre-test checks
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
task: ['pycodestyle']
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade pip setuptools beefore
- name: Run Beefore checks
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
beefore --username github-actions --repository ${{ github.repository }} --pull-request ${{ github.event.number }} --commit ${{ github.event.pull_request.head.sha }} ${{ matrix.task }} .
smoke:
name: Smoke test (Linux) (3.5)
needs: beefore
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install dependencies
run: |
sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config
pip install --upgrade pip setuptools pytest pytest-xdist pytest-tldr
pip install -e .
- name: Install fonts
run: |
xvfb-run -a -s '-screen 0 2048x1536x24' python tests/utils.py
- name: Test
run: |
xvfb-run -a -s '-screen 0 2048x1536x24' pytest tests/ -n auto
python-versions:
name: Python compatibility test (Linux)
needs: smoke
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config
pip install --upgrade pip setuptools pytest pytest-xdist pytest-tldr
pip install -e .
- name: Install fonts
run: |
xvfb-run -a -s '-screen 0 2048x1536x24' python tests/utils.py
- name: Test
run: |
xvfb-run -a -s '-screen 0 2048x1536x24' pytest tests/ -n auto
windows:
name: Windows tests
needs: python-versions
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install dependencies
run: |
pip install --upgrade pip setuptools pytest pytest-xdist pytest-tldr
pip install -e .
- name: Install fonts
run: |
python tests/utils.py
- name: Test
run: |
pytest tests/ -n auto
macOS:
name: macOS tests
needs: python-versions
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install dependencies
run: |
pip install --upgrade pip setuptools pytest pytest-xdist pytest-tldr
pip install -e .
- name: Install fonts
run: |
python tests/utils.py
- name: Test
run: |
pytest tests/ -n auto