Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Nov 20, 2024
1 parent abe0948 commit f9ce2c6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- id: summary
run: |
Expand Down
38 changes: 23 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ env:

on:
workflow_dispatch:
inputs:
usePeriodVersions:
description: 'Use the period versions (.0f1, .10f1, 20f1, ...).'
required: false
default: 'true'
push:
branches:
- develop
Expand All @@ -38,9 +43,12 @@ jobs:
id: setup
run: |
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`
ADDITIONAL_VERSIONS=[]
LATEST_VERSIONS=`npx [email protected] list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
else
ADDITIONAL_VERSIONS=[]
fi
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
Expand All @@ -59,7 +67,7 @@ jobs:
needs: setup
strategy:
fail-fast: false
max-parallel: 4
max-parallel: 6
matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps:
Expand All @@ -75,7 +83,7 @@ jobs:
Library-${{ matrix.unityVersion }}-
Library-
- name: 🛠️ Build Unity Project
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
timeout-minutes: 45
with:
Expand All @@ -84,13 +92,13 @@ jobs:
allowDirtyBuild: true
customParameters: -nographics

- name: 🧪 Run tests
uses: game-ci/unity-test-runner@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# unityVersion: ${{ matrix.unityVersion }}
customParameters: -nographics
checkName: ${{ matrix.unityVersion }} Test Results
githubToken: ${{ github.token }}
coverageOptions: "dontClear;generateHtmlReport;generateBadgeReport;pathFilters:+**/Packages/src/**;assemblyFilters:+<packages>,-*.Editor,-*.Test"
# - name: 🧪 Run tests
# uses: game-ci/unity-test-runner@v4
# timeout-minutes: 45
# with:
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
# # unityVersion: ${{ matrix.unityVersion }}
# customParameters: -nographics
# checkName: ${{ matrix.unityVersion }} Test Results
# githubToken: ${{ github.token }}
# coverageOptions: "dontClear;generateHtmlReport;generateBadgeReport;pathFilters:+**/Packages/src/**;assemblyFilters:+<packages>,-*.Editor,-*.Test"

0 comments on commit f9ce2c6

Please sign in to comment.