Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
8f633943
Commit
8f633943
authored
Jul 15, 2020
by
juga
Browse files
fix: CI: Add .gitlab-ci.yml to run tests in Gitlab
Closes: #40007
parent
3e86fd59
Pipeline
#472
passed with stage
in 50 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
8f633943
variables
:
BASE_IMAGE
:
python:3.7
RELEASE
:
tor-nightly-master-buster
# Without version, the default available in the Debian repository will be
# installed.
# Specifying which version starts with will install the highest that start
# with that version.
TOR
:
tor=*
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
cache
:
paths
:
-
.cache/pip
image
:
$BASE_IMAGE
before_script
:
-
"
wget
https://deb.torproject.org/torproject.org/
\
A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc"
-
cat A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | apt-key add -
-
echo deb [signed-by=A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89]
http://deb.torproject.org/torproject.org $RELEASE
main >> /etc/apt/sources.list
-
apt update -yqq
-
apt install -yqq $TOR
-
pip install tox
-
python --version
-
tor --version
after_script
:
-
tox -e stats
python36tor035
:
variables
:
BASE_IMAGE
:
python:3.6
RELEASE
:
tor-nightly-0.3.5.x-buster
TOR
:
tor=0.3.5*
image
:
$BASE_IMAGE
script
:
-
tox -e py36
-
tox -e integration
python36tor041
:
variables
:
BASE_IMAGE
:
python:3.6
RELEASE
:
tor-nightly-0.4.1.x-buster
TOR
:
tor=0.4.1*
image
:
$BASE_IMAGE
script
:
-
tox -e py36
-
tox -e integration
python36tor042
:
variables
:
BASE_IMAGE
:
python:3.6
RELEASE
:
tor-nightly-0.4.2.x-buster
TOR
:
tor=0.4.2*
image
:
$BASE_IMAGE
script
:
-
tox -e py36
-
tox -e integration
python36torstable
:
variables
:
BASE_IMAGE
:
python:3.6
RELEASE
:
buster
TOR
:
tor
image
:
$BASE_IMAGE
script
:
-
tox -e py36
-
tox -e integration
python37
:
# This will overwrite the default before_script, so need to repeat the
# commands
before_script
:
-
"
wget
https://deb.torproject.org/torproject.org/
\
A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc"
-
cat A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | apt-key add -
-
echo deb [signed-by=A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89]
http://deb.torproject.org/torproject.org $RELEASE
main >> /etc/apt/sources.list
-
apt update -yqq
-
apt install -yqq $TOR
-
pip install tox
-
python --version
-
tor --version
# To build the docs
-
apt install -yqq texlive-latex-extra
-
apt install -yqq dvipng
image
:
$BASE_IMAGE
script
:
-
tox -e inst
-
tox -e setup
-
tox -e py37
-
tox -e integration
-
tox -e lint
-
tox -e doc
python38
:
variables
:
BASE_IMAGE
:
python:3.8
image
:
$BASE_IMAGE
script
:
-
tox -e py38
-
tox -e integration
python39
:
variables
:
BASE_IMAGE
:
python:3.9-rc-buster
image
:
$BASE_IMAGE
script
:
-
tox -e py39
-
tox -e integration
allow_failure
:
true
tox.ini
View file @
8f633943
[tox]
skip_missing_interpreters
=
True
envlist
=
py{36, 37, 38, 39
, nightly
}, inst, setup,
unit,
integration, lint, stats, doc
envlist
=
py{36, 37, 38, 39}, inst, setup, integration, lint, stats, doc
[travis]
python
=
...
...
@@ -10,7 +10,7 @@ python =
3.9-dev:
py39,
inst,
setup,
unit,
integration,
lint,
doc
nightly:
pynightly,
inst,
setup,
unit,
integration,
lint,
doc
[testenv]
;
[testenv]
# install_command can be removed when --process-dependency-links is not
# needed anymore, and this section commented
# install_command = pip install {opts} {packages}
...
...
@@ -32,7 +32,7 @@ skip_install = True
commands
=
python setup.py install
recreate
=
True
[testenv
:unit
]
[testenv]
deps
=
.[test]
commands
=
coverage
run
-a
--rcfile
=
{toxinidir}/.coveragerc --source=sbws -m pytest
\
...
...
@@ -49,6 +49,8 @@ whitelist_externals =
mkdir
rm
commands
=
# For some reason .[test] is not copying config.* files
pip
install
.
cp
-af
{toxinidir}/tests/integration/net
{envtmpdir}
bash
{envtmpdir}/net/start.sh
bash
-c
"time
python3
{envtmpdir}/net/wait.py
{envtmpdir}/net/{auth,relay,exit}*"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment