mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:20:07 +08:00
docker repo migrated (#77)
This commit is contained in:
@@ -6,15 +6,20 @@ describe('Docker', () => {
|
||||
it('builds', async () => {
|
||||
const path = Action.actionFolder;
|
||||
const dockerfile = `${path}/Dockerfile`;
|
||||
const baseImage = new ImageTag({
|
||||
const image = new ImageTag({
|
||||
repository: '',
|
||||
name: 'alpine',
|
||||
version: '3',
|
||||
});
|
||||
|
||||
const baseImage = {
|
||||
toString: () => image.toString().slice(0, image.toString().lastIndexOf('-base-0')),
|
||||
version: image.version,
|
||||
};
|
||||
|
||||
const tag = await Docker.build({ path, dockerfile, baseImage }, true);
|
||||
|
||||
expect(tag).toBeInstanceOf(ImageTag);
|
||||
expect(tag.toString()).toStrictEqual('unity-action:3');
|
||||
expect(tag.toString()).toStrictEqual('unity-action:3-base-0');
|
||||
}, 240000);
|
||||
});
|
||||
|
||||
@@ -2,8 +2,8 @@ import { trimStart } from 'lodash-es';
|
||||
|
||||
class ImageTag {
|
||||
static createForBase({ version, customImage }) {
|
||||
const repository = 'gableroux';
|
||||
const name = 'unity3d';
|
||||
const repository = 'unityci';
|
||||
const name = 'editor';
|
||||
return new this({ repository, name, version, customImage });
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class ImageTag {
|
||||
return this.customImage;
|
||||
}
|
||||
|
||||
return `${this.image}:${this.tag}`;
|
||||
return `${this.image}:${this.tag}-base-0`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('UnityImageVersion', () => {
|
||||
it('returns the correct version', () => {
|
||||
const image = ImageTag.createForBase({ version: '2099.1.1111' });
|
||||
|
||||
expect(image.toString()).toStrictEqual(`gableroux/unity3d:2099.1.1111`);
|
||||
expect(image.toString()).toStrictEqual(`unityci/editor:2099.1.1111-base-0`);
|
||||
});
|
||||
|
||||
it('returns customImage if given', () => {
|
||||
|
||||
Reference in New Issue
Block a user