-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
56 lines (48 loc) · 1.46 KB
/
.gitlab-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
default:
image: python:3.8
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
- if: $CI_MERGE_REQUEST_IID
stages:
- test
.tests: &test_config
before_script:
# so swig is locatable
- apt-get update
# for M2Crypto
- apt-get -y install swig
# Install the local directory instead of the pip version of ubiq-security.
- pip install .
script:
- python tests/EncryptTest.py
- python tests/DecryptTest.py
- python tests/StructuredEncryptTest.py
- python tests/StructuredEncryptForSearchTest.py
- echo "UBIQ_TEST_DATA_FILE $UBIQ_TEST_DATA_FILE"
- echo "UBIQ_MAX_AVG_ENCRYPT $UBIQ_MAX_AVG_ENCRYPT"
- echo "UBIQ_MAX_AVG_DECRYPT $UBIQ_MAX_AVG_DECRYPT"
- echo "UBIQ_MAX_TOTAL_ENCRYPT $UBIQ_MAX_TOTAL_ENCRYPT"
- echo "UBIQ_MAX_TOTAL_DECRYPT $UBIQ_MAX_TOTAL_DECRYPT"
- python tests/load_test.py -i $UBIQ_TEST_DATA_FILE -d $UBIQ_MAX_AVG_DECRYPT -e $UBIQ_MAX_AVG_ENCRYPT -D $UBIQ_MAX_TOTAL_DECRYPT -E $UBIQ_MAX_TOTAL_ENCRYPT
.tests3.8:
stage: test
image: python:3.8
<<: *test_config
.tests3.11:
stage: test
image: python:3.11
<<: *test_config
# Run tests for variables in the ALL or feature environment
test_feature:
extends: .tests
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
environment: feature
# Run tests for variables in the ALL or master environment
test_master:
extends: .tests
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
environment: master