Test #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
inputs: | |
unity_version: | |
description: 'Unity version (value: 2018, 2019, 2020)' | |
default: '2019' | |
required: true | |
env: | |
pythonVersion: '3.7' | |
artifactRetentionDays: 2 | |
jobs: | |
check_and_prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
unity_version: ${{ steps.set_outputs.outputs.unity_version }} | |
steps: | |
- id: set_outputs | |
run: | | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
echo "unity_version=${{ github.event.inputs.unity_version }}" >> $GITHUB_OUTPUT | |
else | |
# inputs are not available for non "workflow_dispatch" events. Therefore, set default value here. | |
echo "unity_version=2019" >> $GITHUB_OUTPUT | |
fi | |
- name: Print output | |
run: | | |
echo outputs.unity_version : ${{ steps.set_outputs.outputs.unity_version }} | |
test_on_macos: | |
name: test-macOS-unity${{ needs.check_and_prepare.outputs.unity_version }} | |
runs-on: macos-latest | |
needs: [check_and_prepare] | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- id: build_setup | |
uses: ./gha/build_setup | |
timeout-minutes: 30 | |
with: | |
unity_version: ${{ needs.check_and_prepare.outputs.unity_version }} | |
platform: macOS | |
python_version: ${{ env.pythonVersion }} | |
unity_username: ${{ secrets.UNITY_USERNAME }} | |
unity_password: ${{ secrets.UNITY_PASSWORD }} | |
unity_serial_id: ${{ secrets.SERIAL_ID }} | |
- name: Set Unity Env for EDM4U build script | |
shell: bash | |
run: echo "UNITY_EXE=${{ env.UNITY_ROOT_DIR }}/Unity.app/Contents/MacOS/Unity" >> $GITHUB_ENV | |
- run: ./gradlew test -q -PINTERACTIVE_MODE_TESTS_ENABLED=0 -PINCLUDE_TEST_TYPES=INTEGRATION -PINCLUDE_TEST_MODULES=ANDROIDRESOLVER | |
# Potential trouble maker | |
# - run: ./gradlew :testPackageManagerResolver --info | |
# - run: ./gradlew :testPackageUploader --info | |
# - run: ./gradlew :testPackageManagerClientIntegrationTestsBatchMode --info | |
- name: Print test log | |
if: always() | |
shell: bash | |
run: cat test_output/test*IntegrationTestsBatchMode/*.log | |
- name: Obtain Failed tests | |
if: always() | |
shell: bash | |
continue-on-error: true | |
run: | | |
cat test_output/test*/*_test.log | grep "^Test .* PASSED$" | |
cat test_output/test*/*_test.log | grep "^Test .* FAILED$" | |
cat test_output/test*/*_test.log | grep "^Test .* SKIPPED$" | |
- name: Return Unity license | |
if: always() | |
uses: firebase/firebase-unity-sdk/gha/unity@main | |
with: | |
version: ${{ inputs.unity_version }} | |
release_license: "true" | |
- name: Upload build logs | |
uses: actions/upload-artifact@v3 | |
if: ${{ !cancelled() }} | |
with: | |
name: logs | |
path: test_output/test*/*.log | |
retention-days: ${{ env.artifactRetentionDays }} |