Skip to content

Updated test workflow to move the project into subdir to make it pass #6

Updated test workflow to move the project into subdir to make it pass

Updated test workflow to move the project into subdir to make it pass #6

Workflow file for this run

name: "Run Tests"
on: [push, pull_request]
jobs:
test-package:
name: Test the package
runs-on: ubuntu-latest
steps:
#Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
#Cache
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Move the package to a subdirectory
- name: Move package to subdirectory
run: |
mkdir -p unity-package
shopt -s extglob
mv !(unity-package) unity-package/
shopt -u extglob
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
packageMode: true
projectPath: unity-package
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ vars.UNITY_VERSION }}