-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8bc73f
commit 73ef8b3
Showing
3 changed files
with
79 additions
and
39 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,78 @@ | ||
--- | ||
name: Test & Build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
if: github.event.pull_request.head.repo.fork == false | ||
name: Test sample game 🧪 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- run: git lfs pull | ||
|
||
- uses: game-ci/unity-test-runner@v4 | ||
id: passportTest | ||
env: | ||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | ||
with: | ||
unityVersion: 2021.3.26f1 | ||
projectPath: './sample' | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
testMode: 'EditMode' | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: Test results | ||
path: ${{ steps.passportTest.outputs.artifactsPath }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: Coverage results | ||
path: ${{ steps.passportTest.outputs.coveragePath }} | ||
build: | ||
name: Build for ${{ matrix.targetPlatform }} | ||
runs-on: ubuntu-latest-8-cores | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
targetPlatform: | ||
- iOS | ||
- Android | ||
- WebGL | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
- uses: actions/cache@v3 | ||
with: | ||
path: Library | ||
key: | ||
Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}-${{ matrix.targetPlatform }} | ||
restore-keys: | | ||
Library-${{ matrix.targetPlatform }} | ||
Library- | ||
- uses: game-ci/unity-builder@v4 | ||
env: | ||
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | ||
with: | ||
unityVersion: 2021.3.26f1 | ||
targetPlatform: ${{ matrix.targetPlatform }} | ||
projectPath: './sample' | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Build | ||
path: build |
This file was deleted.
Oops, something went wrong.
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