fix: multiple scopes
parent
70d5bdc186
commit
46e6918d55
|
@ -703,3 +703,53 @@ jobs:
|
||||||
name: Package Coverage results (all)
|
name: Package Coverage results (all)
|
||||||
path: ${{ steps.packageAllTests.outputs.coveragePath }}
|
path: ${{ steps.packageAllTests.outputs.coveragePath }}
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
testPackageRunnerWithScopeRegistryAndMultipleScopes:
|
||||||
|
name: Test package mode in all modes with Scoped Registry and Multiple Scopes 🔎📦✨
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
projectPath:
|
||||||
|
- unity-package-with-correct-tests/com.dependencyexample.testpackage
|
||||||
|
unityVersion:
|
||||||
|
- 2022.3.13f1
|
||||||
|
- 2023.1.19f1
|
||||||
|
- 2023.2.2f1
|
||||||
|
steps:
|
||||||
|
###########################
|
||||||
|
# Checkout #
|
||||||
|
###########################
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
# Configure test runner
|
||||||
|
- name: Run tests
|
||||||
|
id: packageAllTests
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
projectPath: ${{ matrix.projectPath }}
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
|
testMode: all
|
||||||
|
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+dependencyexample.testpackage.*,-*Tests*'
|
||||||
|
packageMode: true
|
||||||
|
scopedRegistryUrl: https://package.openupm.com
|
||||||
|
registryScopes: 'com.cysharp, com.cysharp.unitask'
|
||||||
|
# Test implicit artifactsPath, by not setting it
|
||||||
|
|
||||||
|
# Upload artifacts
|
||||||
|
- name: Upload test results
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Package test results (all)
|
||||||
|
path: ${{ steps.packageAllTests.outputs.artifactsPath }}
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
|
# Upload coverage
|
||||||
|
- name: Upload coverage results
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Package Coverage results (all)
|
||||||
|
path: ${{ steps.packageAllTests.outputs.coveragePath }}
|
||||||
|
retention-days: 14
|
||||||
|
|
|
@ -100,11 +100,11 @@ if [ "$PACKAGE_MODE" = "true" ]; then
|
||||||
--arg packageName "$PACKAGE_NAME" \
|
--arg packageName "$PACKAGE_NAME" \
|
||||||
--arg projectPath "$UNITY_PROJECT_PATH" \
|
--arg projectPath "$UNITY_PROJECT_PATH" \
|
||||||
--arg scopedRegistryUrl "$SCOPED_REGISTRY_URL" \
|
--arg scopedRegistryUrl "$SCOPED_REGISTRY_URL" \
|
||||||
--arg registryScopes "$REGISTRY_SCOPES" \
|
--argjson registryScopes "$(echo "[\"$REGISTRY_SCOPES\"]" | sed 's/,/","/g')" \
|
||||||
'.dependencies += {"com.unity.testtools.codecoverage": "1.1.1"} |
|
'.dependencies += {"com.unity.testtools.codecoverage": "1.1.1"} |
|
||||||
.dependencies += {"\($packageName)": "file:\($projectPath)"} |
|
.dependencies += {"\($packageName)": "file:\($projectPath)"} |
|
||||||
. += {testables: ["\($packageName)"]} |
|
. += {testables: ["\($packageName)"]} |
|
||||||
. += {scopedRegistries: [{"name":"dependency", "url":"\($scopedRegistryUrl)", scopes: ["\($registryScopes)"]}] }' \
|
. += {scopedRegistries: [{"name":"dependency", "url":"\($scopedRegistryUrl)", scopes: $registryScopes}] }' \
|
||||||
> "$PACKAGE_MANIFEST_PATH"
|
> "$PACKAGE_MANIFEST_PATH"
|
||||||
|
|
||||||
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
|
||||||
|
|
Loading…
Reference in New Issue