-
Notifications
You must be signed in to change notification settings - Fork 214
/
.travis.yml
74 lines (63 loc) · 2 KB
/
.travis.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
# SPDX-FileCopyrightText: © 2008 Back In Time Team
#
# SPDX-License-Identifier: CC0-1.0
#
# This file is released under Creative Commons Zero 1.0 (CC0-1.0) and part of
# the program "Back In Time". The program as a whole is released under GNU
# General Public License v2 or any later version (GPL-2.0-or-later).
#
# TravisCI (https://travis-ci.org) configuration file
os: linux
# Support End of "Focal" (20.04 LTS) is April 2025
# dist: focal
# Support End of "Jammy" (22.04 LTS) is April 2027
dist: jammy
language: python
arch:
- amd64
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
addons:
# add localhost to known_hosts to prevent ssh unknown host prompt during unit tests
ssh_known_hosts: localhost
env:
# TravisCI support said this could prevent errors from "make".
PYTHONUNBUFFERED=1
before_install:
# disable mongodb as we don't need it and it sometimes temporary fails
# https://github.com/travis-ci/travis-ci/issues/4937#issuecomment-149289729
- sudo rm -f /etc/apt/sources.list.d/mongodb*.list
- sudo apt-key del 90CFB1F5
- sudo apt-get -qq update
# install screen, and util-linux (provides flock) for test_sshtools
- sudo apt-get install -y sshfs screen util-linux libdbus-1-dev
jobs:
exclude:
- python: "3.10"
- python: "3.11"
- python: "3.12"
install:
- pip install -U pip
- pip install pylint ruff flake8 pyfakefs keyring
- pip install pyqt6 dbus-python
# add ssh public / private key pair to ensure user can start ssh session to localhost for tests
- ssh-keygen -b 2048 -t rsa -f /home/travis/.ssh/id_rsa -N ""
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
# start ssh-agent so that we can add private keys
- eval `ssh-agent -s`
script:
# compile all files - ensure that syntax is correct
- python -m compileall common common/test common/plugins qt qt/test qt/plugins
# run unit tests - ensure that functionality is correct
- cd common
- ./configure
- make unittest-v
- cd ..
- cd qt
- ./configure
- make
- pytest --verbose