unity-builder/src/model/cloud-runner/cloud-runner.test.ts

35 lines
866 B
TypeScript
Raw Normal View History

2021-12-19 23:46:04 +00:00
import { BuildParameters, ImageTag } from '..';
import CloudRunner from './cloud-runner';
import Input from '../input';
2021-12-20 00:22:47 +00:00
describe('Cloud Runner', () => {
it('responds', () => {});
});
2021-12-20 00:04:46 +00:00
if (process.env.INCLUDE_CLOUD_RUNNER_TEST !== undefined) {
describe('Cloud Runner', () => {
2021-12-19 23:46:04 +00:00
it('builds', async () => {
2021-12-20 00:04:46 +00:00
await runTestBuild();
}, 500000);
2021-12-19 23:46:04 +00:00
});
}
2021-12-20 00:04:46 +00:00
async function runTestBuild() {
Input.cliOptions = {
versioning: 'None',
projectPath: 'test-project',
customBuildSteps: `
- name: 'step 1'
image: 'alpine'
commands: ['printenv']
secrets:
- name: 'testCustomSecret'
value: 'VALUEXXX'
`,
};
Input.githubEnabled = false;
const buildParameter = await BuildParameters.create();
const baseImage = new ImageTag(buildParameter);
await CloudRunner.run(buildParameter, baseImage.toString());
}