Skip to content

Commit

Permalink
feat: support Unity 2020.2 or later
Browse files Browse the repository at this point in the history
BREAKING CHANGE: UpmGitExtension v2.x does not work in Unity 2018/2019. (Please use v1.x).
  • Loading branch information
mob-sakai committed Oct 20, 2021
1 parent c5bd85b commit 557d979
Show file tree
Hide file tree
Showing 46 changed files with 1,667 additions and 2,534 deletions.
81 changes: 26 additions & 55 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,81 +14,52 @@ on:
- synchronize

jobs:
setup:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.setup.outputs.versions }}
steps:
- id: setup
run: echo "::set-output name=versions::`npx unity-changeset list --versions --all --latest-patch --min 2020.1 --json`"

test:
runs-on: ubuntu-latest
needs: setup
strategy:
fail-fast: false
matrix:
unityVersion:
- 2018.3.14f1
- 2018.4.30f1
# - 2019.1.14f1
- 2019.2.21f1
- 2019.3.15f1
- 2019.4.16f1
- 2020.1.0f1
- 2020.1.17f1
- 2020.2.1f1
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
version: ${{ fromJson(needs.setup.outputs.versions) }}

steps:
# Checkout sandbox project
- uses: actions/checkout@v2
with:
ref: sandbox
submodules: true
fetch-depth: 0

# Update package submodule
- uses: actions/checkout@v2
with:
path: Packages/dev
- name: "Update package submodule"
working-directory: Packages/dev
run: git checkout ${{ github.sha }}

# Cache
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
key: Library-${{ matrix.version }}-${{ github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-${{ matrix.version }}-
Library-
# Install codecoverage package
- name: "Install codecoverage package"
if: startsWith(matrix.unityVersion, '2019.4.')
run: |
npx openupm-cli add -f [email protected]
# Run tests
- name: "Run tests"
uses: game-ci/unity-test-runner@main
with:
unityVersion: ${{ matrix.unityVersion }}
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
customParameters: -enableCodeCoverage -nographics
# customParameters: -enableCodeCoverage -coverageOptions assemblyFilters:+CSharpCompilerSettings_,-*-CSharp,-*.Tests,-IgnoreAccessibility

- uses: actions/upload-artifact@v2
if: always()
uses: game-ci/unity-test-runner@v2
with:
name: TestResults-${{ matrix.unityVersion }}
path: |
artifacts/*.xml
CodeCoverage/**/TestCoverageResults_*.xml
publish:
needs: test
runs-on: ubuntu-latest
if: always()
steps:

- uses: actions/download-artifact@v2
with:
path: artifacts

- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}

- name: Push test results
if: always()
run: |
testspace `find . -name '*.xml' | tr '\n' ' '`
customImage: mobsakai/unity_editor:${{ matrix.version }}
customParameters: -nographics
# unityVersion: ${{ matrix.version }}
checkName: ${{ matrix.version }} Test Results
githubToken: ${{ github.token }}
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
Editor/UpmBridge.deps.json*
Editor/UpmBridge.pdb*
UpmBridge~/.idea/
UpmBridge~/obj/
88 changes: 0 additions & 88 deletions Editor/Coffee.UpmGitExtension/AvailableVersionExtensions.cs

This file was deleted.

106 changes: 0 additions & 106 deletions Editor/Coffee.UpmGitExtension/AvailableVersions.cs

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 557d979

Please sign in to comment.