GithubHelp home page GithubHelp logo

hjupter / unity-runner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miragenet/unity-runner

0.0 0.0 0.0 74 KB

Run tests for any Unity project

Home Page: https://github.com/marketplace/actions/unity-test-runner

License: MIT License

Shell 59.44% C# 19.84% Dockerfile 20.72%

unity-runner's Introduction

Unity - Runner

CI


GitHub Action to run unity for any Unity project.

This Action also includes SonarScanner and DocFX installs


Usage

Create or edit the file called .github/workflows/main.yml and add a request activation file job

name: Test project
on: [push]
jobs:
  requestActivationFile:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Request manual activation file
        uses: MirageNet/[email protected]
        id: getManualLicenseFile
        with:
            entrypoint: /request_activation.sh

      - name: Expose as artifact
        uses: actions/upload-artifact@v1
        with:
            name: Manual Activation File
            path: ${{ steps.getManualLicenseFile.outputs.filePath }}

Commit and push this so it runs once. This will generate a manual activation license request file. Save this file and upload it to https://license.unity3d.com/manual

That will generate a license file for personal. Go back to your github project and navigate to Settings -> Secrets

create a secret called UNITY_LICENSE and paste inside the content of the license file.

You can disable the job by adding if: false() or commenting it out, you only needed it to generate the license.

Add a job to run unity cli on your project. You will need a step to activate unity and another step to run unity with any command line argument you want. For example:

jobs:
  testRunnerInEditMode:
    name: Test edit mode ๐Ÿ“
    runs-on: ubuntu-latest
    env:
      UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}   
    steps:
      # Checkout repository (required to test local actions)
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Activate license
        uses: MirageNet/[email protected]
        with:
          entrypoint: /activate.sh

      - name: Run tests
        uses: MirageNet/[email protected]
        with:
          args: -runTests -projectPath .

See the Unity's documentation for a full list of all available argument options.

unity-runner's People

Contributors

paulpach avatar webbertakken avatar hjupter avatar james-frowen avatar michaeljbradley avatar

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.