Skip to content

remove comment

remove comment #50

Workflow file for this run

name: Game test & build 🎮
on: push
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
jobs:
testRunner:
name: Test in ${{ matrix.testMode }} ✨
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testMode:
- EditMode
- PlayMode
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: test_game/.git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('test_game/.lfs-assets-id') }}
- name: Git LFS Pull
run: |
cd test_game
git lfs pull
git add .
git reset --hard
- name: Restore Library cache
uses: actions/cache@v2
with:
path: test_game/Library
key: Library-test-project-${{ matrix.targetPlatform }}
restore-keys: |
Library-test-project-
Library-
- name: Run tests
uses: game-ci/unity-test-runner@v2
id: testRunner
with:
testMode: ${{ matrix.testMode }}
checkName: ${{ matrix.testMode }} test results
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: test_game
- uses: actions/upload-artifact@v2
with:
name: Test results (${{ matrix.testMode }})
path: ${{ steps.testRunner.outputs.artifactsPath }}
buildWebGL:
needs: testRunner
name: Build for WebGL 🖥️
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: game_test/.git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard
git clean -fd
- name: Restore Library cache
uses: actions/cache@v2
with:
path: test_game/Library
key: Library-build-WebGL
restore-keys: |
Library-build-
Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
projectPath: test_game
- name: Create public folder
run: mkdir -p server/public
- name: Archive WebGL build artifacts
uses: actions/upload-artifact@v2
with:
name: WebGL artifacts
path: test_game/game-build
- name: Download WebGL build artifacts
uses: actions/download-artifact@v2
with:
name: WebGL artifacts
path: server/public
- name: List contents of test_game/game-build directory
run: ls -la test_game/game-build
- name: List contents of server/public directory
run: ls -la server/public