forked from ssannandeji/Zenject-2019
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: initial import * ci: ignore sonarqube for now * ci: skip over python setup * ci: put unity project path * add job to build Zenject-usage.dll * ci: give name to job * Update main.yml * looking for syntax error * ci: syntax * syntax * ci: syntax error * use windows-latest * ci: checkout code * ci: rename job to Zenject-usage * ci: upload zenject-usage * ci: improve step name * copy Zenject-usage.dll to unity project * linux uses / not \ * get from downloaded folder * Update main.yml * ci: fix path of test results * semantic release configuration * upm package description * meta for package.json * Add job to request license * this can run on any branch * No need to run CI pipeline for documentation
- Loading branch information
1 parent
9ecc91d
commit c64ff04
Showing
4 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'Documentation/**' | ||
- '*.md' | ||
|
||
jobs: | ||
|
||
#enable this job to request a manual unity license | ||
Request-License: | ||
runs-on: ubuntu-latest | ||
if: false | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Request manual activation file | ||
uses: MirrorNG/unity-runner@master | ||
with: | ||
entrypoint: /request_activation.sh | ||
|
||
# This will produce a Unity_xxx.alf file | ||
# download it in your computer and upload it to | ||
# https://license.unity3d.com/manual | ||
# That will produce a Unity_xxx.ulf file | ||
# add the contents of Unity_xxx.ulf file to your repository's secrets | ||
# as UNITY_LICENSE | ||
# then disable this job | ||
- name: Expose as artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: Manual Activation File | ||
path: ${{ steps.getManualLicenseFile.outputs.filePath }} | ||
|
||
|
||
Zenject-usage: | ||
runs-on: [windows-latest] | ||
name: Zenject-usage | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup MSBuild.exe | ||
uses: warrenbuckley/Setup-MSBuild@v1 | ||
|
||
- name: MSBuild | ||
working-directory: AssemblyBuild\Zenject-usage | ||
run: msbuild Zenject-usage.sln | ||
|
||
- name: Upload dll | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: Zenject-usage | ||
path: AssemblyBuild\Zenject-usage\bin\Debug\ | ||
|
||
buildUnity: | ||
name: Unity test | ||
runs-on: ubuntu-latest | ||
needs: Zenject-usage | ||
env: | ||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
steps: | ||
|
||
# Checkout repository (required to test local actions) | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download Zenject-usage | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: Zenject-usage | ||
|
||
- name: Install Zenject-usage | ||
run: | | ||
ls -l Zenject-usage | ||
cp Zenject-usage/Zenject-usage.dll UnityProject/Assets/Plugins/Zenject/Source/Usage | ||
ls -l UnityProject/Assets/Plugins/Zenject/Source/Usage | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/setup-python@v1 | ||
# with: | ||
# python-version: "3.8" | ||
|
||
# - name: Install filter-repo | ||
# run: pip3 install git-filter-repo | ||
|
||
- name: Activate license | ||
uses: MirrorNG/unity-runner@master | ||
with: | ||
entrypoint: /activate.sh | ||
|
||
# Configure test runner | ||
- name: Run editor Tests | ||
uses: MirrorNG/unity-runner@master | ||
with: | ||
args: -projectPath UnityProject -runTests -testPlatform editmode -testResults Tests/editmode-results.xml -enableCodeCoverage -coverageResultsPath Tests | ||
|
||
# Upload artifacts | ||
- name: Publish test results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: Test results (editor mode) | ||
path: UnityProject/Tests/editmode-results.xml | ||
|
||
# - name: Generate Solution | ||
# uses: MirrorNG/unity-runner@master | ||
# with: | ||
# # Arguments to pass to unity | ||
# args: -buildTarget StandaloneWindows64 -customBuildName MirrorNG -customBuildPath ./build/StandaloneWindows64 -projectPath . -executeMethod UnityEditor.SyncVS.SyncSolution -quit | ||
|
||
# - name: SonarQube analysis | ||
# uses: MirrorNG/unity-sonarscanner@master | ||
# with: | ||
# buildCommand: /opt/Unity/Editor/Data/NetCore/Sdk-2.2.107/dotnet build workspace.sln | ||
# projectKey: MirrorNG_MirrorNG | ||
# projectName: MirrorNG | ||
# sonarOrganisation: mirrorng | ||
# beginArguments: /d:sonar.verbose="true" /d:sonar.cs.nunit.reportsPaths=Tests/editmode-results.xml /d:sonar.cs.opencover.reportsPaths=Tests/workspace-opencov/EditMode/TestCoverageResults_0000.xml | ||
# env: | ||
# FrameworkPathOverride: /opt/Unity/Editor/Data/MonoBleedingEdge/ | ||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Release | ||
uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/exec | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/github", | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/commit-analyzer", { | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{"type": "breaking", "release": "major"}, | ||
{"type": "feature", "release": "minor"}, | ||
] | ||
}], | ||
["@semantic-release/changelog", { | ||
"changelogFile": "UnityProject/Assets/Plugins/Zenject/CHANGELOG.md", | ||
}], | ||
["@semantic-release/npm", { | ||
"npmPublish": false, | ||
"pkgRoot": "UnityProject/Assets/Plugins/Zenject" | ||
}], | ||
["@semantic-release/git", { | ||
"assets": ["UnityProject/Assets/Plugins/Zenject/package.json", "UnityProject/Assets/Plugins/Zenject/CHANGELOG.md"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}] | ||
# ["@semantic-release/exec", { | ||
# "publishCmd": "./publish_upm.sh upm ${nextRelease.version}" | ||
# }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
{ | ||
"name": "com.svermeulen.extenject", | ||
"displayName": "Extenject", | ||
"version": "0.0.1", | ||
"description": "Dependency Injection Framework for Unity3D", | ||
"dependencies": {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.