Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test results not found #31

Closed
bravetarget opened this issue Feb 11, 2020 · 5 comments
Closed

Test results not found #31

bravetarget opened this issue Feb 11, 2020 · 5 comments

Comments

@bravetarget
Copy link

Configuration

name: Build project

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

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

jobs:
  build:
    name: Build my project ✨
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        testMode:
          - playmode
    steps:
    
      # Checkout
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          lfs: true
    
      # Cache
      - uses: actions/cache@v1.1.0
        with:
          path: Library
          key: Library

      # Test
      - name: Run tests
        uses: webbertakken/unity-test-runner@v1.3
        with:
          testMode: ${{ matrix.testMode }}
          artifactsPath: ${{ matrix.testMode }}-artifacts

      # Output 
      - uses: actions/upload-artifact@v1
        with:
          name: Build
          path: ${{ steps.tests.outputs.artifactsPath }}

Output

###########################
#    Project directory    #
###########################

total 44K
drwxr-xr-x 9 1001  115 4.0K Feb 11 17:18 .
drwxr-xr-x 5 root root 4.0K Feb 11 17:18 ..
drwxr-xr-x 9 1001  115 4.0K Feb 11 17:16 .git
-rw-r--r-- 1 1001  115   66 Feb 11 17:16 .gitattributes
drwxr-xr-x 3 1001  115 4.0K Feb 11 17:16 .github
-rw-r--r-- 1 1001  115 1.2K Feb 11 17:16 .gitignore
drwxr-xr-x 2 1001  115 4.0K Feb 11 17:16 .vscode
drwxr-xr-x 4 1001  115 4.0K Feb 11 17:16 Assets
drwxr-xr-x 2 1001  115 4.0K Feb 11 17:16 Packages
drwxr-xr-x 2 1001  115 4.0K Feb 11 17:16 ProjectSettings
drwxr-xr-x 2 root root 4.0K Feb 11 17:18 playmode-artifacts
/steps/run_tests.sh: line 147: [: =: unary operator expected

###########################
#    Play Mode Results    #
###########################

cat: /github/workspace/playmode-artifacts/playmode-results.xml: No such file or directory
cat: /github/workspace/playmode-artifacts/playmode-results.xml: No such file or directory
/steps/run_tests.sh: line 171: [: -gt: unary operator expected
##[error]The process '/usr/bin/docker' failed with exit code 1
##[error]Node run failed with exit code 1

Any ideas? Tested this in a barebones project with a single unit test

@webbertakken
Copy link
Member

Hey @bravetarget, thanks for submitting an issue.

Your config looks good. You may want to follow Unity docs (or a Youtube Video) for how to set up unit tests. It involves a test assembly file for each mode. Under some circumstances you need to follow Unity conventions, like which folder to put your tests.

@bravetarget
Copy link
Author

bravetarget commented Feb 12, 2020

@webbertakken i think the tests are setup properly, i'll look more into this.. but here it is executed from the TestRunner window:
Screen Shot 2020-02-11 at 5 05 25 PM
so, if something is wrong with the test assembly config, that would be a likely reason that the playmode-results.xml file is never generated? or could it be an issue with the github workflow config (which is what i was assuming since running the tests locally works)?

@bravetarget
Copy link
Author

@webbertakken can you paste a .gitignore for a unity project that is passing the checks on github?

@webbertakken
Copy link
Member

webbertakken commented Feb 12, 2020

Sure have a look at the files in this repository (hint)

Note that this repository tests all action flows that you can find in the readme. (see here).

@bravetarget
Copy link
Author

@webbertakken Good info, thank you!
Turns out I copied the wrong license into the Secrets 🤦‍♂
The way the logs reported the failure was a bit misleading, but managed to hunt down the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants