Feature/fix ci #61
Workflow file for this run
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
name: Run the Unity Compile Test | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
push: | |
branches: | |
- main | |
paths: | |
- src/MinimalUtility.Unity/Assets/** | |
- src/MinimalUtility.Unity/Packages/** | |
- src/MinimalUtility.Unity/ProjectSettings/** | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Run the Unity Compile Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out my unity project. | |
uses: actions/checkout@v4.2.2 | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4.2.0 | |
with: | |
path: src/MinimalUtility.Unity/Library | |
key: Library-${{ hashFiles('src/MinimalUtility.Unity/Assets/**', 'src/MinimalUtility.Unity/Packages/**', 'src/MinimalUtility.Unity/ProjectSettings/**') }} | |
restore-keys: | | |
Library- | |
- name: Free disk space | |
run: | | |
chmod +x ./.github/workflows/scripts/free_disk_space.sh | |
.github/workflows/scripts/free_disk_space.sh | |
git checkout -- ./.github/workflows/scripts/free_disk_space.sh | |
- name: Compile Test | |
uses: game-ci/unity-test-runner@v4.3.1 | |
env: | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
unityVersion: auto | |
testMode: editmode | |
projectPath: "src/MinimalUtility.Unity" | |
- uses: actions/upload-artifact@v4.5.0 | |
if: always() | |
with: | |
name: Test results | |
path: artifacts | |
retention-days: 2 |