Skip to content

Commit

Permalink
test: update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Feb 1, 2024
1 parent ad20d12 commit cc2be37
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Required secrets
# UNITY_LICENSE: The contents of Unity license file
# UNITY_EMAIL: Unity user email to login
# UNITY_PASSWORD: Unity user password to login
name: 🧪 Test

env:
Expand Down Expand Up @@ -34,14 +36,18 @@ jobs:
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
echo "unityVersions=${VERSIONS}" | tee $GITHUB_OUTPUT
test:
name: 🧪 Run tests
runs-on: ubuntu-latest
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
permissions:
checks: write
contents: read
Expand All @@ -55,7 +61,7 @@ jobs:
uses: actions/checkout@v4

- name: 📥 Cache library
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
Expand All @@ -64,21 +70,17 @@ jobs:
Library-
- name: 🛠️ Build Unity Project
uses: game-ci/unity-builder@v3
timeout-minutes: 30
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
uses: game-ci/unity-builder@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
targetPlatform: StandaloneLinux64
allowDirtyBuild: true
customParameters: -nographics

- name: 🧪 Run tests
uses: game-ci/unity-test-runner@v3
timeout-minutes: 30
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
uses: game-ci/unity-test-runner@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# unityVersion: ${{ matrix.unityVersion }}
Expand Down

0 comments on commit cc2be37

Please sign in to comment.