|
1 |
| -name: Smoke Tests and Package SDK |
2 |
| -run-name: Smoke Tests and Package SDK on commit ${{ github.sha }} |
| 1 | +name: Run Tests and Package SDK |
| 2 | +run-name: Run Tests and Package SDK on commit ${{ github.sha }} |
3 | 3 | on:
|
4 | 4 | pull_request:
|
5 | 5 | branches: # Made towards the following
|
|
16 | 16 | workflow_dispatch: {}
|
17 | 17 |
|
18 | 18 | jobs:
|
| 19 | + functional-tests: |
| 20 | + name: Functional tests with config ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }} |
| 21 | + runs-on: ubuntu-latest |
| 22 | + timeout-minutes: 20 |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + testMode: |
| 27 | + - playmode |
| 28 | + unityVersion: |
| 29 | + - 2019.4.40f1 |
| 30 | + - 2020.3.48f1 |
| 31 | + - 2021.3.29f1 |
| 32 | + - 2022.3.7f1 |
| 33 | + jsonLibrary: |
| 34 | + - zerodep |
| 35 | + - newtonsoft |
| 36 | + steps: |
| 37 | + - name: Checkout this repository |
| 38 | + uses: actions/checkout@v2 |
| 39 | + - name: Checkout test repository |
| 40 | + uses: actions/checkout@v2 |
| 41 | + with: |
| 42 | + repository: LootLocker/unity-sdk-tests |
| 43 | + path: ./tests~ # Unity ignores folders with ~ from inclusion |
| 44 | + - name: Set SDK path in test repo |
| 45 | + run: sudo chmod 777 ./tests~/switchLootLockerDependency.sh && ./tests~/switchLootLockerDependency.sh "./tests~/" "file:../../" |
| 46 | + - name: Cache Libraries |
| 47 | + uses: actions/cache@v2 |
| 48 | + with: |
| 49 | + path: tests~/Library |
| 50 | + key: Library-${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }} |
| 51 | + restore-keys: Library- |
| 52 | + - name: Configure LootLocker to use Newtonsoft JSON |
| 53 | + if: ${{ matrix.jsonLibrary == 'newtonsoft' }} |
| 54 | + run: | |
| 55 | + sed -i 's/NO_LOOTLOCKER_USE_NEWTONSOFTJSON/LOOTLOCKER_USE_NEWTONSOFTJSON/' tests~/ProjectSettings/ProjectSettings.asset |
| 56 | + - name: Run tests ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }} |
| 57 | + uses: game-ci/unity-test-runner@v2 |
| 58 | + id: tests |
| 59 | + env: |
| 60 | + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} |
| 61 | + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} |
| 62 | + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} |
| 63 | + with: |
| 64 | + testMode: ${{ matrix.testMode }} |
| 65 | + checkName: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }} Test Results |
| 66 | + artifactsPath: ${{ matrix.unityVersion }}-${{ matrix.testMode }}-${{ matrix.jsonLibrary }}-artifacts |
| 67 | + projectPath: tests~/ |
| 68 | + unityVersion: ${{ matrix.unityVersion }} |
| 69 | + githubToken: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + customParameters: -apikey ${{ secrets.LOOTLOCKER_API_KEY }} -domainkey ${{ secrets.LOOTLOCKER_DOMAIN_KEY }} |
19 | 71 | editor-smoke-test:
|
20 | 72 | name: Test SDK in Editor
|
21 | 73 | runs-on: [ubuntu-latest]
|
@@ -500,7 +552,7 @@ jobs:
|
500 | 552 | #runs-on: [k8s]
|
501 | 553 | #container:
|
502 | 554 | # image: ubuntu-latest
|
503 |
| - needs: [test-samples, validate-sdk] |
| 555 | + needs: [test-samples, validate-sdk, functional-tests] |
504 | 556 | timeout-minutes: 5
|
505 | 557 | if: (startsWith(github.ref, 'refs/pull') && endsWith(github.base_ref, 'main')) || (startsWith(github.ref, 'refs/heads') && endsWith(github.ref, 'main')) || startsWith(github.ref, 'refs/tags/v')
|
506 | 558 | env:
|
|
0 commit comments