Add extra tests to verify integrity

pull/2/head
Webber 2019-11-30 17:09:11 +01:00 committed by Webber Takken
parent 36f292ff9a
commit 2ed439468a
1 changed files with 54 additions and 4 deletions

View File

@ -13,7 +13,7 @@ jobs:
# Configure test runner # Configure test runner
- name: Run tests - name: Run tests
id: allTests id: allTests
uses: webbertakken/unity-test-runner@v1 uses: ./
env: env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
TEST_MODE: all TEST_MODE: all
@ -27,6 +27,56 @@ jobs:
name: Test results (all) name: Test results (all)
path: ${{ steps.allTests.outputs.artifactsPath }} path: ${{ steps.allTests.outputs.artifactsPath }}
testRunnerInEditMode:
name: Test edit mode 📝
runs-on: ubuntu-latest
steps:
# Checkout repository (required to test local actions)
- name: Checkout repository
uses: actions/checkout@v1
# Configure test runner
- name: Run tests
id: editMode
uses: ./
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
TEST_MODE: editmode
UNITY_PROJECT_PATH: unity-project-with-correct-tests
ARTIFACTS_PATH: artifacts/editmode
# Upload artifacts
- name: Upload test results
uses: actions/upload-artifact@v1
with:
name: Test results (edit mode)
path: ${{ steps.editMode.outputs.artifactsPath }}
testRunnerInPlayMode:
name: Test play mode 📺
runs-on: ubuntu-latest
steps:
# Checkout repository (required to test local actions)
- name: Checkout repository
uses: actions/checkout@v1
# Configure test runner
- name: Run tests
id: playMode
uses: ./
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
TEST_MODE: playmode
UNITY_PROJECT_PATH: unity-project-with-correct-tests
ARTIFACTS_PATH: artifacts/editmode
# Upload artifacts
- name: Upload test results
uses: actions/upload-artifact@v1
with:
name: Test results (play mode)
path: ${{ steps.playMode.outputs.artifactsPath }}
testRunnerInEachModeSeparately: testRunnerInEachModeSeparately:
name: Test each mode sequentially # don't try this at home (it's much slower) name: Test each mode sequentially # don't try this at home (it's much slower)
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -37,7 +87,7 @@ jobs:
# Configure first test runner # Configure first test runner
- name: Tests in editmode 📝 - name: Tests in editmode 📝
uses: webbertakken/unity-test-runner@v1 uses: ./
env: env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
TEST_MODE: editmode TEST_MODE: editmode
@ -46,7 +96,7 @@ jobs:
# Configure second test runner # Configure second test runner
- name: Tests in playmode 📺 - name: Tests in playmode 📺
uses: webbertakken/unity-test-runner@v1 uses: ./
env: env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
TEST_MODE: playmode TEST_MODE: playmode
@ -57,5 +107,5 @@ jobs:
- name: Upload combined test results - name: Upload combined test results
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: Test results (by reference) name: Test results (combined)
path: artifacts/ path: artifacts/