Skip to content

Commit

Permalink
Create unity-compile-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kochounoyume authored Dec 30, 2024
1 parent 5ae1aa4 commit b840627
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/unity-compile-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run the Unity Compile Test
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
paths:
- Assets/**
- Packages/**
- 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: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', '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
customParameters: -testFilter "CreatePage.CreatePageTest.CreatePage"
- uses: actions/upload-artifact@v4.5.0
if: always()
with:
name: Test results
path: artifacts
retention-days: 2

0 comments on commit b840627

Please sign in to comment.