Skip to content

Commit

Permalink
Divide workflow into two separated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
konraddysput committed Feb 6, 2024
1 parent 3e123a5 commit a473f98
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/main.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test package
name: Build package

on: [push, pull_request]

Expand All @@ -9,15 +9,11 @@ jobs:
strategy:
fail-fast: false
matrix:
testMode:
- playmode
# - editmode
projectPath:
- test-package
unityVersion:
- 2022.3.19f1
- 2019.4.40f1
- 2020.3.48f1
targetPlatform:
- StandaloneOSX
- StandaloneWindows
Expand All @@ -37,19 +33,6 @@ jobs:
mkdir ${{ matrix.projectPath }}
mv Editor Runtime Tests Android iOS Windows package.json ${{ matrix.projectPath }}/
- name: Run Tests
uses: game-ci/[email protected]
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
packageMode: true
projectPath: ${{ matrix.projectPath }}/
testMode: ${{ matrix.testMode }}
unityVersion: ${{ matrix.unityVersion }}
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"

- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/[email protected]

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test package

on: [push, pull_request]

jobs:
test:
name: Run Tests in ${{ matrix.testMode }} ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testMode:
- playmode
# - editmode
projectPath:
- test-package
unityVersion:
- 2022.3.19f1
- 2019.4.40f1
- 2020.3.48f1
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true

- name: Setup Environment
run: |
mkdir ${{ matrix.projectPath }}
mv Editor Runtime Tests Android iOS Windows package.json ${{ matrix.projectPath }}/
- name: Run Tests
uses: game-ci/[email protected]
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
packageMode: true
projectPath: ${{ matrix.projectPath }}/
testMode: ${{ matrix.testMode }}
unityVersion: ${{ matrix.unityVersion }}
coverageOptions: "generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+my.assembly.*"

0 comments on commit a473f98

Please sign in to comment.