mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-06 15:13:22 -04:00
test ci
This commit is contained in:
48
.drone.star
48
.drone.star
@@ -123,6 +123,7 @@ def main(ctx):
|
||||
|
||||
before = \
|
||||
[ buildOcisBinaryForTesting(ctx) ] + \
|
||||
[benchmark(ctx)] + \
|
||||
testOcisModules(ctx) + \
|
||||
testPipelines(ctx)
|
||||
|
||||
@@ -138,7 +139,7 @@ def main(ctx):
|
||||
]
|
||||
|
||||
purge = purgeBuildArtifactCache(ctx, 'ocis-binary-amd64')
|
||||
purge['depends_on'] = getPipelineNames(testPipelines(ctx))
|
||||
purge['depends_on'] = getPipelineNames(testPipelines(ctx) + [benchmark(ctx)])
|
||||
|
||||
after = [
|
||||
manifest(ctx),
|
||||
@@ -525,6 +526,51 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n
|
||||
},
|
||||
}
|
||||
|
||||
def benchmark(ctx):
|
||||
return {
|
||||
'kind': 'pipeline',
|
||||
'type': 'docker',
|
||||
'name': 'benchmark',
|
||||
'platform': {
|
||||
'os': 'linux',
|
||||
'arch': 'amd64',
|
||||
},
|
||||
'steps':
|
||||
restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') +
|
||||
ocisServer('ocis') + [
|
||||
{
|
||||
'name': 'build benchmarks',
|
||||
'image': 'node',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd tests/k6',
|
||||
'yarn',
|
||||
'yarn build',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'run benchmarks',
|
||||
'image': 'loadimpact/k6',
|
||||
'pull': 'always',
|
||||
'environment': {
|
||||
'OC_HOST': 'https://ocis-server:9200',
|
||||
},
|
||||
'commands': [
|
||||
'cd tests/k6',
|
||||
'for f in ./dist/test-* ; do k6 run "$f" ; done',
|
||||
],
|
||||
},
|
||||
],
|
||||
'depends_on': getPipelineNames([buildOcisBinaryForTesting(ctx)]),
|
||||
'trigger': {
|
||||
'ref': [
|
||||
'refs/heads/master',
|
||||
'refs/tags/v*',
|
||||
'refs/pull/**',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
def uiTests(ctx, phoenixBranch, phoenixCommit):
|
||||
suiteNames = config['uiTests']['suites'].keys()
|
||||
return [uiTestPipeline(ctx, suiteName, phoenixBranch, phoenixCommit) for suiteName in suiteNames]
|
||||
|
||||
Reference in New Issue
Block a user