Skip to content

Commit

Permalink
Add github actions for test runner (#24)
Browse files Browse the repository at this point in the history
* Test runner

* No matrix

* Activation

* Added code coverage

* Updated meta?

* Updated .so

* Enable coverage

* Versions testing

* Update

* Warning?

* Removed token, update action
  • Loading branch information
Macoron committed May 20, 2023
1 parent 4d1cc3c commit c79f281
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Acquire activation file
on:
workflow_dispatch: {}
jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Testing

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
testAllModes:
name: Test in ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 2019.4.40f1
- 2020.3.48f1
- 2021.3.25f1
- 2022.2.19f1
steps:
- uses: actions/checkout@v3
- uses: game-ci/unity-test-runner@v2
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
testMode: playmode
unityVersion: ${{ matrix.unityVersion }}
checkName: ${{ matrix.unityVersion }} Test Results
coverageOptions: 'generateHtmlReport;assemblyFilters:+com.whisper.unity'
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results for ${{ matrix.unityVersion }}
path: ${{ steps.tests.outputs.artifactsPath }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.unityVersion }}
path: ${{ steps.tests.outputs.coveragePath }}
Binary file modified Packages/com.whisper.unity/Plugins/Linux/libwhisper.so
Binary file not shown.
65 changes: 62 additions & 3 deletions Packages/com.whisper.unity/Plugins/Linux/libwhisper.so.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"com.unity.ide.visualstudio": "2.0.15",
"com.unity.ide.vscode": "1.2.5",
"com.unity.test-framework": "1.3.4",
"com.unity.testtools.codecoverage": "1.0.1",
"com.unity.timeline": "1.6.4",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
Expand Down
17 changes: 17 additions & 0 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.settings-manager": {
"version": "1.0.3",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.3.4",
"depth": 0,
Expand All @@ -43,6 +50,16 @@
},
"url": "https://packages.unity.com"
},
"com.unity.testtools.codecoverage": {
"version": "1.0.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.0.16",
"com.unity.settings-manager": "1.0.1"
},
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.6.4",
"depth": 0,
Expand Down

0 comments on commit c79f281

Please sign in to comment.