Skip to content

Commit 7bf4d97

Browse files
authored
CircleCI config added ✨ (#162)
CircleCI configuration added 👷
1 parent c53b7f7 commit 7bf4d97

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed

.circleci/config.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
version: 2.1
2+
3+
commands:
4+
after_failure:
5+
parameters:
6+
when:
7+
type: string
8+
steps:
9+
- run:
10+
name: On failure action
11+
command: |
12+
cat /var/log/nuodb/nuoadmin.log*
13+
grep ssl /opt/nuodb/etc/nuoadmin.conf
14+
when: <<parameters.when>>
15+
16+
- when:
17+
condition: <<parameters.when>>
18+
steps:
19+
- store_artifacts:
20+
path: /var/log/nuodb/nuoadmin.log
21+
22+
23+
jobs:
24+
build_n_run:
25+
docker:
26+
- image: nuodb/nuodb-ce:latest
27+
user: root
28+
resource_class: small
29+
steps:
30+
- checkout
31+
- run:
32+
command: dnf install make -y
33+
name: Install make
34+
- run:
35+
name : Install python dependencies
36+
command: make install
37+
- run:
38+
name : Create test result folder
39+
command: mkdir test_results
40+
- run:
41+
name : Configure and run NuoDB Admin
42+
command: |
43+
sudo -u nuodb "/opt/nuodb/etc/nuoadmin" tls $NUO_SET_TLS
44+
sudo -u nuodb "/opt/nuodb/etc/nuoadmin" start
45+
- run:
46+
name: Run test
47+
command: make test
48+
- store_artifacts:
49+
path: htmlcov
50+
- store_test_results:
51+
path: test_results
52+
- after_failure:
53+
when : "on_fail"
54+
55+
environment:
56+
TZ : America/New_York
57+
NUO_SET_TLS : disable
58+
59+
workflows:
60+
build-project:
61+
jobs:
62+
- build_n_run

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pip-log.txt
3636
.testtemp
3737
nosetests.xml
3838
htmlcov/
39+
test_results/
3940

4041
# Translations
4142
*.mo

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
PYTHON ?= python
3030
VIRTUALENV ?= virtualenv
31-
PIP ?= pip
31+
PIP ?= pip3
3232

3333
MKDIR ?= mkdir -p
3434
RMDIR ?= rm -rf
@@ -38,7 +38,7 @@ VIRTDIR ?= ./.virttemp
3838

3939
PYTEST_ARGS ?=
4040

41-
PYTEST_OPTS ?=
41+
PYTEST_OPTS ?= --junitxml=test_results/result.xml
4242
PYTEST_COV ?= --cov=pynuodb --cov-report html --cov-report term-missing
4343

4444
SUDO ?= sudo -n

0 commit comments

Comments
 (0)