-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 2.13 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
name: CI - Continuous Integration
on: [push]
jobs:
unit-tests:
runs-on: ubuntu-latest
#----------------------------------------------
# set up QT environment variables
#----------------------------------------------
env:
QT_QPA_PLATFORM: offscreen
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Install poetry
run: pip install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
#----------------------------------------------
# ----- install apt dependencies -----
#----------------------------------------------
- name: Install Apt Dependencies
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-x11-0 libxkbcommon-x11-dev libxcb-xinerama0 \
libxkbcommon-dev libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev \
libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev \
libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev \
libxcb-randr0-dev libxcb-render-util0-dev libegl1
#----------------------------------------------
# install dependencies
#----------------------------------------------
- name: Install dependencies
run: poetry install
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: |
poetry run pytest tests --cov=glassure --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}