more debug #135
This file contains hidden or 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
| #https://game.ci/docs/github/test-runner | ||
| name: Run Tests | ||
| on: | ||
| [push, pull_request_target, workflow_dispatch] | ||
| jobs: | ||
| run_tests: | ||
| name: Run tests | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: unity_tests | ||
| steps: | ||
| - name: Checkout project code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| lfs: true | ||
| - name: Setup node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 'lts/*' | ||
| - run: npm install @actions/core | ||
| - run: npm install @actions/github | ||
| - run: npm install jsdom | ||
| - run: npm install fs | ||
| - name: Debug Secret Visibility | ||
| run: | | ||
| if [ -z "${{ secrets.UNITY_LICENSE }}" ]; then | ||
| echo "SECRET IS EMPTY" | ||
| else | ||
| echo "SECRET IS DEFINED" | ||
| fi | ||
| - name: Debug license/email/password lengths | ||
| run: | | ||
| echo "UNITY_LICENSE length: ${#UNITY_LICENSE}" | ||
| echo "UNITY_EMAIL length: ${#UNITY_EMAIL}" | ||
| echo "UNITY_PASSWORD length: ${#UNITY_PASSWORD}" | ||
| env: | ||
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
| - name: Run tests | ||
| uses: game-ci/unity-test-runner@v4 | ||
| with: | ||
| testMode: editmode | ||
| env: | ||
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
| - name: Produce summary output | ||
| uses: ./.github/actions/interpret-test-results | ||
| if: always() | ||
| id: interpret-test-results | ||
| with: | ||
| XML_PATH: artifacts/editmode-results.xml | ||
| - name: Notify discord if tests fail | ||
| uses: rjstone/discord-webhook-notify@v1 | ||
| if: failure() && github.event_name != 'pull_request' | ||
| with: | ||
| severity: error | ||
| details: ${{ steps.interpret-test-results.outputs.DISPLAY_STRING }} | ||
| webhookUrl: ${{ secrets.DISCORD_WEBHOOK_TEST_RESULTS }} | ||
| - name: Notify discord if tests succeed | ||
| uses: rjstone/discord-webhook-notify@v1 | ||
| if: success() && github.event_name != 'pull_request' | ||
| with: | ||
| severity: info | ||
| details: ${{ steps.interpret-test-results.outputs.DISPLAY_STRING }} | ||
| webhookUrl: ${{ secrets.DISCORD_WEBHOOK_TEST_RESULTS }} | ||
| - name: Upload test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: Test results | ||
| path: artifacts | ||