From 45442318c924b5e0b23bfd7ea4dd7ca1fef13c46 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 13:43:18 +0900 Subject: [PATCH 01/13] Added Github actions for Unity. --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a1baead --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [ github-unity3-actions ] + pull_request: + branches: [ github-unity3-actions ] + +jobs: + buildAndTest: + name: Build and Test Workflow + runs-on: ubuntu-latest + steps: + # Checkout + - name: Checkout repository + uses: actions/checkout@v2 + with: + lfs: true + + # Cache + - uses: actions/cache@v1.1.0 + with: + path: test-project/Library + key: Library-test-project-WebGL + + # Test + - name: Run tests + uses: webbertakken/unity-test-runner@v1.3 + with: + projectPath: test-project + unityVersion: 2019.4.12f1 + + # Build + - name: Build project + uses: webbertakken/unity-builder@v0.10 + with: + projectPath: test-project + unityVersion: 2019.4.12f1 + targetPlatform: WebGL From 338ff93ed6a1b9652779f2c88575a0b75399d108 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 13:44:07 +0900 Subject: [PATCH 02/13] Updated branch names. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1baead..2539e41 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ github-unity3-actions ] + branches: [ github-unity3d-actions ] pull_request: - branches: [ github-unity3-actions ] + branches: [ github-unity3d-actions ] jobs: buildAndTest: From f73d34235d6beb2c3a4ca5201a573f364d3718c1 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 14:20:48 +0900 Subject: [PATCH 03/13] Added env for Unity License. --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2539e41..c49492d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ on: branches: [ github-unity3d-actions ] pull_request: branches: [ github-unity3d-actions ] + +env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} jobs: buildAndTest: @@ -12,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: # Checkout - - name: Checkout repository + - name: Checkout Repository uses: actions/checkout@v2 with: lfs: true @@ -24,14 +27,14 @@ jobs: key: Library-test-project-WebGL # Test - - name: Run tests + - name: Run Tests uses: webbertakken/unity-test-runner@v1.3 with: projectPath: test-project unityVersion: 2019.4.12f1 # Build - - name: Build project + - name: Build Project uses: webbertakken/unity-builder@v0.10 with: projectPath: test-project From be697f8de83875ef5ee71d0054bfdae2cc5d9e8f Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 14:38:32 +0900 Subject: [PATCH 04/13] Testing Github artifacts. --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c49492d..b2da623 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,3 +40,11 @@ jobs: projectPath: test-project unityVersion: 2019.4.12f1 targetPlatform: WebGL + + # Upload Artifacts + - uses: actions/upload-artifact@v1 + with: + name: Build + path: build + + From 402d7ef9d9fc4a2e168af47e5ed16f858ee05819 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 14:45:25 +0900 Subject: [PATCH 05/13] Updated GitHub action branches. --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2da623..1fd119a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ github-unity3d-actions ] + branches: [ master ] pull_request: - branches: [ github-unity3d-actions ] + branches: [ master ] env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -42,9 +42,9 @@ jobs: targetPlatform: WebGL # Upload Artifacts - - uses: actions/upload-artifact@v1 - with: - name: Build - path: build + # - uses: actions/upload-artifact@v1 + # with: + # name: Build + # path: build From 7638d787db8452e4b6ff8a2d09ee11f12d51e9a6 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 15:01:08 +0900 Subject: [PATCH 06/13] Added GitHub action badge in README.md. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 341b872..2daa55b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Unity Scriptable Objects [![Unity 2019.4+](https://img.shields.io/badge/unity-2019.4%2B-blue.svg)](https://unity3d.com/get-unity/download) +[![Actions Status](https://github.com/chark/unity-scriptable-objects/workflows/CI/badge.svg)](https://github.com/chark/unity-scriptable-objects/actions) This package provides utilities for implementing game architecture which is oriented around `ScriptableObject` assets and game events. Most of these ideas are based on [Unite2017](https://github.com/roboryantron/Unite2017). From 3c53609464d597a3b9711562f6bcb3e81f6b110e Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 18:54:51 +0900 Subject: [PATCH 07/13] Updated GitHub actions workflow. --- .github/workflows/main.yml | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fd119a..ad5fa51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,13 +5,13 @@ on: branches: [ master ] pull_request: branches: [ master ] - + env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} jobs: - buildAndTest: - name: Build and Test Workflow + test: + name: Unity Tests Workflow runs-on: ubuntu-latest steps: # Checkout @@ -20,31 +20,9 @@ jobs: with: lfs: true - # Cache - - uses: actions/cache@v1.1.0 - with: - path: test-project/Library - key: Library-test-project-WebGL - # Test - name: Run Tests uses: webbertakken/unity-test-runner@v1.3 with: projectPath: test-project unityVersion: 2019.4.12f1 - - # Build - - name: Build Project - uses: webbertakken/unity-builder@v0.10 - with: - projectPath: test-project - unityVersion: 2019.4.12f1 - targetPlatform: WebGL - - # Upload Artifacts - # - uses: actions/upload-artifact@v1 - # with: - # name: Build - # path: build - - From 0f57cb6e3d8b13b6d070d2528e34c0e91c128101 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 18:59:45 +0900 Subject: [PATCH 08/13] Fixed actions. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad5fa51..23dc545 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,5 +24,5 @@ jobs: - name: Run Tests uses: webbertakken/unity-test-runner@v1.3 with: - projectPath: test-project + projectPath: . unityVersion: 2019.4.12f1 From e67ba6fe2fc78ea3a49a18b05643c3e0ee63c618 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Sun, 25 Oct 2020 19:23:14 +0900 Subject: [PATCH 09/13] Added activation.yml. --- .github/workflows/activation.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/activation.yml diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml new file mode 100644 index 0000000..4d20c04 --- /dev/null +++ b/.github/workflows/activation.yml @@ -0,0 +1,16 @@ +name: Activation + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + activateAndThenReturnLicense: + name: Return License + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: webbertakken/unity-activate@v1.2 + - uses: webbertakken/unity-return-license@v1 From a5f54a65c8b774a36859c8978fb0407e3e52e9eb Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Mon, 26 Oct 2020 09:59:02 +0900 Subject: [PATCH 10/13] Updated activation.yml. --- .github/workflows/activation.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml index 4d20c04..6626146 100644 --- a/.github/workflows/activation.yml +++ b/.github/workflows/activation.yml @@ -1,16 +1,18 @@ -name: Activation - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - +name: Acquire activation file +on: [push] jobs: - activateAndThenReturnLicense: - name: Return License - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: webbertakken/unity-activate@v1.2 - - uses: webbertakken/unity-return-license@v1 + activation: + name: Request manual activation file + runs-on: ubuntu-latest + steps: + # Request manual activation file + - name: Request manual activation file + id: getManualLicenseFile + uses: webbertakken/unity-request-manual-activation-file@v1.1 + with: + unityVersion: 2019.4.11f1 + - name: Expose as artifact + uses: actions/upload-artifact@v1 + with: + name: ${{ steps.getManualLicenseFile.outputs.filePath }} + path: ${{ steps.getManualLicenseFile.outputs.filePath }} From 2d197ef38e2bc302c203ea5b2a6175e2bfa5ee3d Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Mon, 26 Oct 2020 10:05:31 +0900 Subject: [PATCH 11/13] Removed activation.yml. --- .github/workflows/activation.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/activation.yml diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml deleted file mode 100644 index 6626146..0000000 --- a/.github/workflows/activation.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Acquire activation file -on: [push] -jobs: - activation: - name: Request manual activation file - runs-on: ubuntu-latest - steps: - # Request manual activation file - - name: Request manual activation file - id: getManualLicenseFile - uses: webbertakken/unity-request-manual-activation-file@v1.1 - with: - unityVersion: 2019.4.11f1 - - name: Expose as artifact - uses: actions/upload-artifact@v1 - with: - name: ${{ steps.getManualLicenseFile.outputs.filePath }} - path: ${{ steps.getManualLicenseFile.outputs.filePath }} From 79e8f67927c70dcab7f548a415980046428e54df Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Mon, 26 Oct 2020 10:11:39 +0900 Subject: [PATCH 12/13] Updated Unity version. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23dc545..912f334 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,4 @@ jobs: uses: webbertakken/unity-test-runner@v1.3 with: projectPath: . - unityVersion: 2019.4.12f1 + unityVersion: 2019.4.11f1 From ab42a832f8293576803dea4cc46c2ac83473be50 Mon Sep 17 00:00:00 2001 From: Ugnius Malukas Date: Mon, 26 Oct 2020 10:34:55 +0900 Subject: [PATCH 13/13] Added step for storing test results. --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 912f334..e66476c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,15 @@ jobs: # Test - name: Run Tests + id: testRunner uses: webbertakken/unity-test-runner@v1.3 with: projectPath: . unityVersion: 2019.4.11f1 + + # Test Results + - name: Upload Test Results + uses: actions/upload-artifact@v1 + with: + name: Test results + path: ${{ steps.testRunner.outputs.artifactsPath }}