-
Notifications
You must be signed in to change notification settings - Fork 17
153 lines (132 loc) · 4.92 KB
/
Copy pathtest.yml
File metadata and controls
153 lines (132 loc) · 4.92 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: KBase Workspace tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
# run workflow when merging to main or develop
branches:
- main
- master
- develop
# TODO find out what minio ver we're using in CI / appdev / prod and use that
# TODO split tests into mongo related & non mongo related. Run the former once.
jobs:
workspace_container_tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies and set up test config
shell: bash
run: |
# set up python dependencies
pip install pytest requests
- name: Run tests
shell: bash
run: |
sh test/run_tests.sh
workspace_deluxe_tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- java: '8' # needs to be compatible so jars can be used w/ java 8
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'true'
gradle_test: 'testQuick'
# the current production setup
- java: '11'
mongo: 'mongodb-linux-x86_64-3.6.13'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
gradle_test: 'testQuick'
steps:
- uses: actions/checkout@v4
- name: Set up java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9.19"
- name: Install dependencies and set up test config
shell: bash
run: |
export HOMEDIR=`pwd`
# set up python dependencies
cd python_dependencies
pip install pipenv
pipenv sync --system
cd ..
# move to parent dir of homedir to install binaries etc
cd ..
# set up arango
export ARANGODB_VER=3.9.1
export ARANGODB_V=39
curl -O https://download.arangodb.com/arangodb$ARANGODB_V/Community/Linux/arangodb3-linux-$ARANGODB_VER.tar.gz
tar -xf arangodb3-linux-$ARANGODB_VER.tar.gz
export ARANGO_EXE=$(pwd)/arangodb3-linux-$ARANGODB_VER/bin/arangod
export ARANGO_JS=$(pwd)/arangodb3-linux-$ARANGODB_VER/usr/share/arangodb3/js/
# set up handle service
# HS_COMMIT corresponds to Handle Service2 tag v1.0.7
export HS_COMMIT=335020d26f3663da456be5afee3cb4b8ed8622f4
git clone https://github.com/kbase/handle_service2.git
cd handle_service2/
git checkout $HS_COMMIT
cd lib/
export HSDIR=`pwd`
cd ../..
# set up sample service
# SAMPLE_COMMIT corresponds to Sample Service tag v0.2.1
export SAMPLE_COMMIT=aa0303c4d5d4aa1e3cf0c9ecb36366fb1127f93e
git clone https://github.com/kbase/sample_service.git
cd sample_service
git checkout $SAMPLE_COMMIT
cd lib
export SAMPLE_DIR=`pwd`
cd ../..
# set up blobstore
wget -q -O blobstore https://github.com/kbase/blobstore/releases/download/v0.1.2/blobstore_linux_amd64
chmod a+x blobstore
export BLOBEXE=$(pwd)/blobstore
# set up mongo
wget -q http://fastdl.mongodb.org/linux/${{matrix.mongo}}.tgz
tar xfz ${{matrix.mongo}}.tgz
export MONGOD=`pwd`/${{matrix.mongo}}/bin/mongod
# set up minio
export MINIO=$HOMEDIR/test_dependencies/minio/${{matrix.minio}}/minio
gunzip $MINIO.gz
chmod a+x $MINIO
# set up test config
cd $HOMEDIR
cp -n test.cfg.example test.cfg
sed -i "s#^test.temp.dir =.*#test.temp.dir=temp_test_dir#" test.cfg
sed -i "s#^test.mongo.exe.*#test.mongo.exe=$MONGOD#" test.cfg
sed -i "s#^test.minio.exe.*#test.minio.exe=$MINIO#" test.cfg
sed -i "s#^test.mongo.useWiredTiger.*#test.mongo.useWiredTiger=${{matrix.wired_tiger}}#" test.cfg
sed -i "s#^test.blobstore.exe.*#test.blobstore.exe=$BLOBEXE#" test.cfg
sed -i "s#^test.handleservice.dir.*#test.handleservice.dir=$HSDIR#" test.cfg
sed -i "s#^test.sampleservice.dir.*#test.sampleservice.dir=$SAMPLE_DIR#" test.cfg
sed -i "s#^test.arango.exe.*#test.arango.exe=$ARANGO_EXE#" test.cfg
sed -i "s#^test.arango.js.*#test.arango.js=$ARANGO_JS#" test.cfg
cat test.cfg
- name: Run tests
shell: bash
run: |
./gradlew ${{matrix.gradle_test}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true