|
1 |
| -# This is a basic workflow to help you get started with Actions |
| 1 | +name: Unity 2022.3.x Test Runner |
2 | 2 |
|
3 |
| -name: CI |
4 |
| - |
5 |
| -# Controls when the action will run. Triggers the workflow on push or pull request |
6 |
| -# events but only for the master branch |
7 | 3 | on:
|
8 | 4 | pull_request:
|
9 | 5 | branches:
|
10 |
| - - master |
11 |
| - - develop |
12 |
| - |
13 |
| -env: |
14 |
| - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} |
| 6 | + - master |
| 7 | + - beta/** |
15 | 8 |
|
16 | 9 | jobs:
|
17 |
| - testAllModes: |
18 |
| - name: Test in ${{ matrix.testMode }} on version ${{ matrix.unityVersion }} |
| 10 | + test: |
| 11 | + name: Test on Unity ${{ matrix.unityVersion }} |
19 | 12 | runs-on: ubuntu-latest
|
| 13 | + |
20 | 14 | strategy:
|
21 | 15 | fail-fast: false
|
22 | 16 | matrix:
|
23 |
| - projectPath: |
24 |
| - - ./ |
25 | 17 | unityVersion:
|
26 |
| - - 2020.1.13f1 |
27 |
| - testMode: |
28 |
| - - all |
29 |
| -# - playmode |
30 |
| -# - editmode |
| 18 | + - 2022.3.42f1 |
| 19 | + |
31 | 20 | steps:
|
32 |
| - - uses: actions/checkout@v2 |
| 21 | + # リポジトリをチェックアウト |
| 22 | + - name: Checkout repository |
| 23 | + uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + lfs: true # Large File Storageが必要な場合に true を指定 |
| 26 | + |
| 27 | + # Unity Test Runnerを実行 (エディットモードテスト) |
| 28 | + - name: Run Edit Mode Tests |
| 29 | + uses: game-ci/unity-test-runner@v4 |
| 30 | + env: |
| 31 | + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} |
| 32 | + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} |
| 33 | + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} |
33 | 34 | with:
|
34 |
| - lfs: true |
35 |
| - |
| 35 | + projectPath: ./ |
| 36 | + unityVersion: ${{ matrix.unityVersion }} |
| 37 | + customParameters: -runTests -testPlatform editmode |
| 38 | + artifactsPath: editmode-results |
| 39 | + |
| 40 | + # アーティファクトのアップロード(エディットモード) |
| 41 | + - name: Upload Edit Mode Test results for ${{ matrix.unityVersion }} |
| 42 | + uses: actions/upload-artifact@v4 |
36 | 43 | with:
|
37 |
| - path: ${{ matrix.projectPath }}/Library |
38 |
| - key: Library-${{ matrix.projectPath }} |
39 |
| - restore-keys: | |
40 |
| - Library- |
41 |
| - - uses: webbertakken/[email protected] |
42 |
| - id: tests |
| 44 | + name: Edit Mode Test results for Unity ${{ matrix.unityVersion }} |
| 45 | + path: editmode-results |
| 46 | + |
| 47 | + # Unity Test Runnerを実行 (プレイモードテスト) |
| 48 | + - name: Run Play Mode Tests |
| 49 | + uses: game-ci/unity-test-runner@v4 |
| 50 | + env: |
| 51 | + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} |
| 52 | + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} |
| 53 | + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} |
43 | 54 | with:
|
44 |
| - projectPath: ${{ matrix.projectPath }} |
| 55 | + projectPath: ./ |
45 | 56 | unityVersion: ${{ matrix.unityVersion }}
|
46 |
| - testMode: ${{ matrix.testMode }} |
47 |
| - artifactsPath: ${{ matrix.testMode }}-artifacts |
48 |
| - - uses: actions/upload-artifact@v4 |
| 57 | + customParameters: -runTests -testPlatform playmode |
| 58 | + artifactsPath: playmode-results |
| 59 | + |
| 60 | + # アーティファクトのアップロード(プレイモード) |
| 61 | + - name: Upload Play Mode Test results for ${{ matrix.unityVersion }} |
| 62 | + uses: actions/upload-artifact@v4 |
49 | 63 | with:
|
50 |
| - name: Test results for ${{ matrix.testMode }} |
51 |
| - path: ${{ steps.tests.outputs.artifactsPath }} |
| 64 | + name: Play Mode Test results for Unity ${{ matrix.unityVersion }} |
| 65 | + path: playmode-results |
0 commit comments