Skip to content

Commit 6a4ddd5

Browse files
committed
Merge branch 'feature/unity-build-android-signing' of https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks into feature/unity-build-build-profiles
2 parents ed38b3e + 0d5dc63 commit 6a4ddd5

File tree

7 files changed

+138
-164
lines changed

7 files changed

+138
-164
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Build, Test and Deploy
2+
3+
on:
4+
pull_request:
5+
branches: [ main, development ]
6+
push:
7+
branches: [ main, development ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
# UnityActivateLicense
23+
- name: Install UnityActivateLicenseV1
24+
run: npm install
25+
working-directory: Tasks/UnityActivateLicense/UnityActivateLicenseV1
26+
27+
- name: Build UnityActivateLicenseV1
28+
run: npm run build
29+
working-directory: Tasks/UnityActivateLicense/UnityActivateLicenseV1
30+
31+
# UnityBuild
32+
- name: Install UnityBuildV3
33+
run: npm install
34+
working-directory: Tasks/UnityBuild/UnityBuildV3
35+
36+
- name: Build UnityBuildV3
37+
run: npm run build
38+
working-directory: Tasks/UnityBuild/UnityBuildV3
39+
40+
# UnityCMD
41+
- name: Install UnityCMDV1
42+
run: npm install
43+
working-directory: Tasks/UnityCMD/UnityCMDV1
44+
45+
- name: Build UnityCMDV1
46+
run: npm run build
47+
working-directory: Tasks/UnityCMD/UnityCMDV1
48+
49+
# UnityGetProjectVersion
50+
- name: Install UnityGetProjectVersionV1
51+
run: npm install
52+
working-directory: Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1
53+
54+
- name: Build UnityGetProjectVersionV1
55+
run: npm run build
56+
working-directory: Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1
57+
58+
- name: Test UnityGetProjectVersionV1
59+
run: npm run test
60+
working-directory: Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1
61+
62+
# UnitySetup
63+
- name: Install UnitySetupV1
64+
run: npm install
65+
working-directory: Tasks/UnitySetup/UnitySetupV1
66+
67+
- name: Build UnitySetupV1
68+
run: npm run build
69+
working-directory: Tasks/UnitySetup/UnitySetupV1
70+
71+
- name: Install UnitySetupV2
72+
run: npm install
73+
working-directory: Tasks/UnitySetup/UnitySetupV2
74+
75+
- name: Build UnitySetupV2
76+
run: npm run build
77+
working-directory: Tasks/UnitySetup/UnitySetupV2
78+
79+
# UnityTest
80+
- name: Install UnityTestV1
81+
run: npm install
82+
working-directory: Tasks/UnityTest/UnityTestV1
83+
84+
- name: Build UnityTestV1
85+
run: npm run build
86+
working-directory: Tasks/UnityTest/UnityTestV1

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,7 @@ dist
105105

106106
*.js
107107
*.vsix
108-
.vs/
108+
.vs/
109+
110+
# Azure DevOps extensions
111+
.taskkey

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Documentation for the extension can be found at [www.unitydevops.com](https://ww
1414

1515
| Branch | Description | Status |
1616
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
17-
| main | The main branch is build and deployed to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=DinomiteStudios.64e90d50-a9c0-11e8-a356-d3eab7857116) | [![Build Status](https://dev.azure.com/dinomite/Unity%20Tools%20for%20Azure%20DevOps/_apis/build/status%2FDinomite-Studios.unity-azure-pipelines-tasks?branchName=main)](https://dev.azure.com/dinomite/Unity%20Tools%20for%20Azure%20DevOps/_build/latest?definitionId=51&branchName=main) |
17+
| main | The main branch is build and deployed to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=DinomiteStudios.64e90d50-a9c0-11e8-a356-d3eab7857116) | [![Build, Test and Deploy](https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/actions/workflows/build-test-deploy.yml/badge.svg)](https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/actions/workflows/build-test-deploy.yml) |
1818

1919
## Contributions
2020

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "unity-get-project-version.js",
66
"scripts": {
77
"build": "tsc",
8-
"test": "npm run build && nyc mocha test/_suite.js",
8+
"test": "nyc mocha test/_suite.js",
99
"upload": "tfx build tasks upload --task-path ./",
1010
"dev-delete": "tfx build tasks delete --task-id 38ec98bf-601a-4390-9f2e-23d43dd6dbba",
1111
"dev-upload": "npm run build && npm run upload"

Tasks/UnityGetProjectVersion/UnityGetProjectVersionV1/test/_suite.ts

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,71 @@ import assert from 'assert';
22
import * as mocktest from 'azure-pipelines-task-lib/mock-test';
33
import * as path from 'path';
44

5-
describe("Unity Get Project Version", async () => {
6-
it("Error determining the project version from file", async () => {
5+
describe("Unity Get Project Version", () => {
6+
it("Error determining the project version from file", (done) => {
77
let testPath = path.join(__dirname, 'errorDeterminingTheProjectVersionFromFile.js');
88

99
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
1010

11-
await runner.runAsync();
11+
runner.runAsync()
12+
.then(() => {
13+
assert.strictEqual(runner.failed, true);
14+
assert.strictEqual(runner.invokedToolCount, 0);
15+
assert(runner.stdOutContained('loc_mock_failGetUnityEditorVersion | Unknown project version format encountered'));
1216

13-
assert.strictEqual(runner.failed, true);
14-
assert.strictEqual(runner.invokedToolCount, 0);
15-
assert(runner.stdOutContained('loc_mock_failGetUnityEditorVersion | Unknown project version format encountered'));
17+
done();
18+
}
19+
);
1620
})
1721

18-
it("Success (alpha) determining the project version from file", async () => {
22+
it("Success (alpha) determining the project version from file", (done) => {
1923
let testPath = path.join(__dirname, 'successAlphaDeterminingTheProjectVersionFromFile.js');
2024

2125
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
2226

23-
await runner.runAsync();
27+
runner.runAsync()
28+
.then(() => {
29+
assert.strictEqual(runner.succeeded, true);
30+
assert.strictEqual(runner.invokedToolCount, 0);
31+
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49a1, revision=4dae1bb8668d, alpha=true, beta=false'));
32+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49a1'));
33+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
2434

25-
assert.strictEqual(runner.succeeded, true);
26-
assert.strictEqual(runner.invokedToolCount, 0);
27-
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49a1, revision=4dae1bb8668d, alpha=true, beta=false'));
28-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49a1'));
29-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
35+
done();
36+
});
3037
})
3138

32-
it("Success (beta) determining the project version from file", async () => {
39+
it("Success (beta) determining the project version from file", (done) => {
3340
let testPath = path.join(__dirname, 'successBetaDeterminingTheProjectVersionFromFile.js');
3441

3542
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
3643

37-
await runner.runAsync();
44+
runner.runAsync()
45+
.then(() => {
46+
assert.strictEqual(runner.succeeded, true);
47+
assert.strictEqual(runner.invokedToolCount, 0);
48+
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49b1, revision=4dae1bb8668d, alpha=false, beta=true'));
49+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49b1'));
50+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
3851

39-
assert.strictEqual(runner.succeeded, true);
40-
assert.strictEqual(runner.invokedToolCount, 0);
41-
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49b1, revision=4dae1bb8668d, alpha=false, beta=true'));
42-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49b1'));
43-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
52+
done();
53+
});
4454
})
4555

46-
it("Success (stable) determining the project version from file", async () => {
56+
it("Success (stable) determining the project version from file", (done) => {
4757
let testPath = path.join(__dirname, 'successStableDeterminingTheProjectVersionFromFile.js');
4858

4959
let runner: mocktest.MockTestRunner = new mocktest.MockTestRunner(testPath);
5060

51-
await runner.runAsync();
61+
runner.runAsync()
62+
.then(() => {
63+
assert.strictEqual(runner.succeeded, true);
64+
assert.strictEqual(runner.invokedToolCount, 0);
65+
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49f1, revision=4dae1bb8668d, alpha=false, beta=false'));
66+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49f1'));
67+
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
5268

53-
assert.strictEqual(runner.succeeded, true);
54-
assert.strictEqual(runner.invokedToolCount, 0);
55-
assert(runner.stdOutContained('loc_mock_successGetUnityEditorVersion 2022.3.49f1, revision=4dae1bb8668d, alpha=false, beta=false'));
56-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersion;isOutput=false;issecret=false;]2022.3.49f1'));
57-
assert(runner.stdOutContained('##vso[task.setvariable variable=projectVersionRevision;isOutput=false;issecret=false;]4dae1bb8668d'));
69+
done();
70+
});
5871
})
5972
})

azure-pipelines.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)