Coder Social home page Coder Social logo

Comments (9)

DooblyNoobly avatar DooblyNoobly commented on August 22, 2024 2

I'm getting the exact problem with our tests: https://github.com/unitystation/unitystation/actions

Here is our test config: https://github.com/unitystation/unitystation/blob/develop/.github/workflows/test.yml

We also just upgraded from Unity 2019.2 to 2019.3. It would work most of the time when we were on 2019.2 but every now and then would throw the urinary error:

/steps/run_tests.sh: line 164: [: =: unary operator expected /steps/run_tests.sh: line 182: [: -gt: unary operator expected

Now after upgrading to 2019.3 it fails with that error all the time

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

Hey @pablothedolphin adn thanks for reporting your issue!

Could you also show your workflow configuration for your test job?

from unity-test-runner.

pablothedolphin avatar pablothedolphin commented on August 22, 2024

Here's my action script:

Thanks for the quick response @webbertakken ! Here it is:

name: Run Unit Tests

on:
  pull_request: {}
  push: { branches: [master] }

env:
  UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
  testAllModes:
    name: Test in ${{ matrix.testMode }} on version ${{ matrix.unityVersion }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        projectPath:
          - Test-Project
        unityVersion:
          - 2019.3.6f1
          - 2020.1.0b4
        testMode:
          - editmode
          - playmode
    steps:
      - uses: actions/checkout@v2
        with:
          lfs: true
      - uses: actions/[email protected]
        with:
          path: ${{ matrix.projectPath }}/Library
          key: Library-${{ matrix.projectPath }}
          restore-keys: |
            Library-
      - uses: webbertakken/[email protected]
        id: tests
        with:
          projectPath: ${{ matrix.projectPath }}
          unityVersion: ${{ matrix.unityVersion }}
          testMode: ${{ matrix.testMode }}
          artifactsPath: ${{ matrix.testMode }}-artifacts
      - uses: actions/upload-artifact@v1
        with:
          name: Test results for ${{ matrix.testMode }}
          path: ${{ steps.tests.outputs.artifactsPath }}

My best guess is that the license activates fine but it fails to open the editor / the editor is crashing somehow.

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

Hmm it doesn't really become clear from these logs what's going on.

You're right about that it looks like the license activates but then the editor crashes. Note that activating already happens within the editor itself. So it's when trying to run your tests that it crashes.

Possibly a permission issue. Otherwise perhaps a misconfiguration of test assembly files. Either way we need to find a better way to get logs out of unity.

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

Good to know it doesn't always happen and that there seems to be a difference between Unity versions. I'd say that rules out misconfiguration of test assembly files.

I doubt the unary operator being the reason for the actual failure, and still think the failure is silent. On the runs where it doesn't fail, does it also give you the errors about unary operator?

from unity-test-runner.

DooblyNoobly avatar DooblyNoobly commented on August 22, 2024

So this is what those logs look like in a test that passes:

2020-04-06T21:45:55.5686712Z /steps/run_tests.sh: line 109: [: =: unary operator expected
2020-04-06T21:45:55.5687144Z /steps/run_tests.sh: line 164: [: =: unary operator expected
2020-04-06T21:45:55.5687908Z /steps/run_tests.sh: line 182: [: -gt: unary operator expected
2020-04-06T21:45:55.7803486Z ##[group]Run actions/setup-dotnet@v1```

So I guess yeah it does it on tests that have passed as well

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

Yea so it is really about Unity not giving us enough information about what's going on.

I think we need to get more information out of either unity or the test script specifically.

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

Duplicate of https://github.com/webbertakken/unity-actions/issues/70#issuecomment-637817909

This issue can be resolved by using stable, non-beta versions.

from unity-test-runner.

webbertakken avatar webbertakken commented on August 22, 2024

See also https://github.com/game-ci/unity-actions/issues/84

from unity-test-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.