name: Actions 😎 on: pull_request: {} push: { branches: [master] } env: UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nJHdOBFmBNq2H8BrGFzir/StLoYo=aENLHd37a51RtP2/g7YU0Pexf5mx0/ENXYGtrPzqwZ8NQt2AsSdxGnl0CUB45/GuNXfJVDt2HWot\ncNYZB2OylVBn1WHQbKZlPmm8gEAMz0MYbr4Isb5i5buryBrZlmbEOjnRI+pEg1CBwlgMo6xdtjjE\n/d7cC293QIUO91kdzRXftYou1dNaUyuPL9ZH65vdB2pDXGRNxgUVD+GnnqZA7b5L2HXqNQclcWAK\n5Yd1BeF3VzR1iLw9G/SmH5oOhnpXSmqbL4qk7LVP2/mgXpFk5kP4X8VC3z47obNhBIGq40dwWyEe\nUYk5/nRAOkZawDT+tcu96e06gPC9Cxk5PdbRbA==" jobs: readmeWorkflow: name: Readme 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.2.11f1 # Build - name: Build project uses: webbertakken/unity-builder@v0.10 with: projectPath: test-project unityVersion: 2019.2.11f1 targetPlatform: WebGL # Output - uses: actions/upload-artifact@v1 with: name: Build path: build # # End of readme workflow. # # Below is a test of most combinations, for testing integrity. # requestManualActivationFile: name: Request manual activation file 🔑 runs-on: ubuntu-latest strategy: fail-fast: false matrix: unityVersion: - 2018.4.15f1 - 2019.2.11f1 - 2019.2.14f1 - 2019.2.17f1 steps: # Checkout repository - uses: actions/checkout@v2 # Request manual activation file - uses: webbertakken/unity-request-manual-activation-file@v1.1 id: getManualLicenseFile with: unityVersion: ${{ matrix.unityVersion }} # Upload artifact (Unity_v20XX.X.XXXX.alf) - uses: actions/upload-artifact@v1 with: name: Manual Activation File path: ${{ steps.getManualLicenseFile.outputs.filePath }} requestActivation: name: Request activation ✔ runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: webbertakken/unity-activate@v1.2 activateAndThenReturnLicense: name: returnLicense 🎈 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: webbertakken/unity-activate@v1.2 - uses: webbertakken/unity-return-license@v1 testRunnerInEditMode: name: Test in editmode 📝 runs-on: ubuntu-latest steps: # Checkout repository (required to test local actions) - uses: actions/checkout@v2 with: lfs: true # Cache - uses: actions/cache@v1.1.0 with: path: test-project/Library key: Library-test-project-${{ matrix.targetPlatform }} restore-keys: | Library-test-project- Library- # Configure test runner - uses: webbertakken/unity-test-runner@v1.3 id: testRunner with: projectPath: test-project testMode: editmode # Upload artifact - uses: actions/upload-artifact@v1 with: name: Test results (edit mode) path: ${{ steps.testRunner.outputs.artifactsPath }} testRunnerInPlayMode: name: Test in playmode 📺 runs-on: ubuntu-latest steps: # Checkout repository (required to test local actions) - uses: actions/checkout@v2 with: lfs: true # Cache - uses: actions/cache@v1.1.0 with: path: test-project/Library key: Library-test-project-${{ matrix.targetPlatform }} restore-keys: | Library-test-project- Library- # Configure test runner - uses: webbertakken/unity-test-runner@v1.3 id: testRunner with: projectPath: test-project testMode: playmode # Upload artifact - uses: actions/upload-artifact@v1 with: name: Test results (play mode) path: ${{ steps.testRunner.outputs.artifactsPath }} testRunnerInAllModes: name: Test all modes ✨ runs-on: ubuntu-latest steps: # Checkout repository (required to test local actions) - uses: actions/checkout@v2 with: lfs: true # Cache - uses: actions/cache@v1.1.0 with: path: test-project/Library key: Library-test-project-${{ matrix.targetPlatform }} restore-keys: | Library-test-project- Library- # Configure test runner - uses: webbertakken/unity-test-runner@v1.3 id: testRunner with: projectPath: test-project testMode: all # Upload artifacts - uses: actions/upload-artifact@v1 with: name: Test results (all modes) path: ${{ steps.testRunner.outputs.artifactsPath }} # # Complete advanced workflow # buildAndTestForSomePlatforms: name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: projectPath: - test-project unityVersion: - 2019.2.11f1 targetPlatform: - StandaloneOSX # Build a macOS standalone (Intel 64-bit). - StandaloneWindows64 # Build a Windows 64-bit standalone. - StandaloneLinux64 # Build a Linux 64-bit standalone. - iOS # Build an iOS player. - WebGL # WebGL. steps: - uses: actions/checkout@v2 with: lfs: true - uses: actions/cache@v1.1.0 with: path: ${{ matrix.projectPath }}/Library key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} restore-keys: | Library-${{ matrix.projectPath }}- Library- - uses: webbertakken/unity-test-runner@v1.3 id: testRunner with: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} - uses: actions/upload-artifact@v1 with: name: Test results (all modes) path: ${{ steps.testRunner.outputs.artifactsPath }} - uses: webbertakken/unity-builder@v0.10 with: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} customParameters: "-myParameter myValue -myBoolean -ThirdParameter andItsValue" - uses: actions/upload-artifact@v1 with: name: Build path: build