diff --git a/.github/workflows/gameci.yml b/.github/workflows/gameci.yml new file mode 100644 index 00000000..46fd1cc9 --- /dev/null +++ b/.github/workflows/gameci.yml @@ -0,0 +1,72 @@ +# MIT License +# +# Copyright (c) 2022 anatawa12 +# Copyright (c) 2022 bd_ +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + + +name: GameCI + +on: + push: + branches: [master, dev, ci] + pull_request: {} + workflow_dispatch: {} + +jobs: + build-and-test: + runs-on: ubuntu-latest + permissions: + checks: write + steps: + - uses: actions/checkout@v3 +# with: +# ref: project-for-test +# - uses: actions/checkout@v3 +# with: +# path: Packages/nadena.dev.modular-avatar + - uses: anatawa12/sh-actions/resolve-vpm-packages@master + + - uses: actions/cache@v3 + with: + path: Library + key: Library + restore-keys: Library + + - uses: game-ci/unity-test-runner@v2 + id: gameci + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + testMode: EditMode + githubToken: ${{ github.token }} + coverageOptions: generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+nadena.dev.* + customParameters: -nographics -assemblyNames Tests + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: Test results + path: ${{ steps.gameci.outputs.artifactsPath }} + - uses: actions/upload-artifact@v3 + if: always() + with: + name: Coverage results + path: ${{ steps.gameci.outputs.coveragePath }} \ No newline at end of file diff --git a/.github/workflows/gamici-activation.yml b/.github/workflows/gamici-activation.yml new file mode 100644 index 00000000..b7467471 --- /dev/null +++ b/.github/workflows/gamici-activation.yml @@ -0,0 +1,39 @@ +# MIT License +# +# Copyright (c) 2022 anatawa12 +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +name: GameCI 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 + - name: Expose as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.getManualLicenseFile.outputs.filePath }} + path: ${{ steps.getManualLicenseFile.outputs.filePath }} \ No newline at end of file