@@ -42,52 +42,27 @@ build:
4242 sudo unlink /usr/bin/python3
4343 sudo ln -s $(which python3) /usr/bin/python3
4444 sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
45- ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
46- ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
47- bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
4845 bazel build //...
4946 bazel run @graknlabs_dependencies//tool/checkstyle:test-coverage
5047 bazel test $(bazel query 'kind(checkstyle_test, //...)') --test_output=errors
51- # test-concept:
52- # image: graknlabs-ubuntu-20.04
53- # type: foreground
54- # command: |
55- # pyenv global 3.6.10
56- # sudo unlink /usr/bin/python3
57- # sudo ln -s $(which python3) /usr/bin/python3
58- # sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
59- # ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
60- # ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
61- # bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
62- # bazel test //:test_concept --test_output=errors
63- # test-connection:
64- # image: graknlabs-ubuntu-20.04
65- # type: foreground
66- # command: |
67- # pyenv global 3.6.10
68- # sudo unlink /usr/bin/python3
69- # sudo ln -s $(which python3) /usr/bin/python3
70- # sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
71- # ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
72- # ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
73- # bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
74- # bazel test //:test_connection --test_output=errors
75- # test-query:
76- # image: graknlabs-ubuntu-20.04
77- # type: foreground
78- # command: |
79- # pyenv global 3.6.10
80- # sudo unlink /usr/bin/python3
81- # sudo ln -s $(which python3) /usr/bin/python3
82- # sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
83- # ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
84- # ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
85- # bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
86- # bazel test //:test_query --test_output=errors
48+ test-behaviour :
49+ image : graknlabs-ubuntu-20.04
50+ type : foreground
51+ command : |
52+ pyenv global 3.6.10
53+ pip install -r requirements_dev.txt
54+ sudo unlink /usr/bin/python3
55+ sudo ln -s $(which python3) /usr/bin/python3
56+ sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
57+ bazel test //tests/behaviour/connection/... --test_output=errors --jobs=1
58+ bazel test //tests/behaviour/concept/... --test_output=errors --jobs=1
59+ bazel test //tests/behaviour/graql/language/match/... --test_output=errors --jobs=1
60+ bazel test //tests/behaviour/graql/language/get/... --test_output=errors --jobs=1
61+ bazel test //tests/behaviour/graql/language/define/... --test_output=errors --jobs=1
62+ # TODO: remove --jobs=1 from Concept and Graql tests once Grakn runner is parallelisable
8763 deploy-pip-snapshot :
8864 image : graknlabs-ubuntu-20.04
89- # TODO: should depend on tests
90- dependencies : [build]
65+ dependencies : [build, test-behaviour]
9166 filter :
9267 owner : graknlabs
9368 branch : master
@@ -97,37 +72,28 @@ build:
9772 sudo unlink /usr/bin/python3
9873 sudo ln -s $(which python3) /usr/bin/python3
9974 sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
100- ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
101- ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
102- bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
10375 export DEPLOY_PIP_USERNAME=$REPO_GRAKN_USERNAME
10476 export DEPLOY_PIP_PASSWORD=$REPO_GRAKN_PASSWORD
10577 bazel run --define version=$(git rev-parse HEAD) //:deploy-pip -- snapshot
106- # TODO: fix test-deployment
107- # test-deployment:
108- # image: graknlabs-ubuntu-20.04
109- # dependencies: [deploy-pip-snapshot]
110- # filter:
111- # owner: graknlabs
112- # branch: master
113- # type: foreground
114- # command: |
115- # pyenv global 3.6.10
116- # sudo unlink /usr/bin/python3
117- # sudo ln -s $(which python3) /usr/bin/python3
118- # sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
119- # ARTIFACT_USERNAME=$REPO_GRAKN_USERNAME \
120- # ARTIFACT_PASSWORD=$REPO_GRAKN_PASSWORD \
121- # bazel run @graknlabs_dependencies//distribution/artifact:create-netrc
122- # bazel run //:grakn-extractor -- dist/grakn-core-server-linux
123- # nohup ./dist/grakn-core-server-linux/grakn server start
124- # sleep 60
125- # echo -n "0.0.0-$GRABL_COMMIT" > VERSION
126- # sed -i -e "s/CLIENT_PYTHON_VERSION_MARKER/$(cat VERSION)/g" test/deployment/requirements.txt
127- # cat test/deployment/requirements.txt
128- # pip install --upgrade pip
129- # pip install -r test/deployment/requirements.txt
130- # cd test/deployment/ && python -m unittest test
78+ test-deployment-pip :
79+ image : graknlabs-ubuntu-20.04
80+ dependencies : [deploy-pip-snapshot]
81+ filter :
82+ owner : graknlabs
83+ branch : master
84+ type : foreground
85+ command : |
86+ pyenv global 3.6.10
87+ sudo unlink /usr/bin/python3
88+ sudo ln -s $(which python3) /usr/bin/python3
89+ sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.6.10/lib/python3.6/site-packages/lsb_release.py
90+ bazel run //tests:grakn-extractor -- grakn-core-all-linux
91+ ./grakn-core-all-linux/grakn server &
92+ pip install --extra-index-url https://repo.grakn.ai/repository/pypi-snapshot/simple grakn-client==0.0.0-$GRABL_COMMIT
93+ cd tests/deployment/ && python -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
94+ kill $(jps | awk '/GraknServer/ {print $1}')
95+ exit $TEST_SUCCESS
96+
13197
13298release :
13399 filter :
0 commit comments