Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Mar 22, 2024
1 parent c81835f commit 4f7d166
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
projectPath:
- "unity-sdk"
- ""
unityVersion:
- 2022.3.17f1
targetPlatform:
Expand All @@ -28,8 +28,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# fetch-depth: 0
lfs: false

- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
Expand All @@ -40,13 +41,15 @@ jobs:
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
Library-${{ matrix.projectPath }}-
Library-
- name: Setup Config
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
run: |
mkdir -p Assets/Tests/Resources
echo '{"clientId": "${{ secrets.CLIENT_ID }}"}' > Assets/Tests/Resources/config.json
shell: bash

- name: Run Tests
uses: game-ci/unity-test-runner@v4
env:
Expand All @@ -59,19 +62,29 @@ jobs:
unityVersion: ${{ matrix.unityVersion }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: PlayMode # Run PlayMode tests.

# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Test results-${{ matrix.targetPlatform }}-${{ github.run_number }}
# path: ${{ steps.testRunner.outputs.artifactsPath }}
- name: Publish Test Results for ${{ matrix.targetPlatform }}
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: ${{ steps.testRunner.outputs.artifactsPath }}/playmode-tests.xml
check_name: "Test Results for ${{ matrix.targetPlatform }}"
comment_title: "Test Results for ${{ matrix.targetPlatform }}"

- name: Copy Test Results
if: always()
run: |
cp -Lpr ${{ steps.testRunner.outputs.artifactsPath }} test-results
shell: bash

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: test-results/**/*.xml
check_name: "Test Results for ${{ matrix.targetPlatform }}"
comment_title: "Test Results for ${{ matrix.targetPlatform }}"

# - uses: jlumbroso/[email protected]

# - uses: game-ci/unity-builder@v4
# env:
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
Expand All @@ -82,6 +95,7 @@ jobs:
# unityVersion: ${{ matrix.unityVersion }}
# targetPlatform: ${{ matrix.targetPlatform }}
# allowDirtyBuild: true

# - uses: actions/upload-artifact@v3
# with:
# name: Build-${{ matrix.targetPlatform }}-${{ github.run_number }}
Expand Down

0 comments on commit 4f7d166

Please sign in to comment.