Skip to content

Commit 0219693

Browse files
authored
chore: Update workflows (#61)
* Update integrate.yml * Update integrate.yml * Update deploy.yml * Update integrate.yml
1 parent bb0648e commit 0219693

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ jobs:
5151
check-license:
5252
name: Check for Unity License
5353
runs-on: ubuntu-latest
54-
outputs:
55-
is_unity_license_set: ${{ steps.check-license.outputs.is_unity_license_set }}
5654
steps:
57-
- name: Check whether Unity Activation requests should be done
58-
id: check-license
59-
run: |
60-
echo "Skip activation job: ${{ env.UNITY_LICENSE != '' }}"
61-
echo "::set-output name=is_unity_license_set::${{ env.UNITY_LICENSE != '' }}"
55+
- name: Fail build if no unity license set
56+
if: ${{ env.UNITY_LICENSE == '' }}
57+
uses: actions/github-script@v6
58+
with:
59+
script: |
60+
core.setFailed('No unity license secret set')
6261
6362
build:
6463
name: Build for ${{ matrix.targetPlatform }}

.github/workflows/integrate.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,22 @@ env:
1616
PROJECT_PATH: Test
1717
PROJECT_NAME: Test
1818

19-
jobs:
19+
jobs:
2020
check-license:
2121
name: Check for Unity License
2222
runs-on: ubuntu-latest
23-
outputs:
24-
is_unity_license_set: ${{ steps.check-license.outputs.is_unity_license_set }}
2523
steps:
26-
- name: Check whether Unity Activation requests should be done
27-
id: check-license
28-
run: |
29-
echo "Skip activation job: ${{ env.UNITY_LICENSE != '' }}"
30-
echo "::set-output name=is_unity_license_set::${{ env.UNITY_LICENSE != '' }}"
24+
- name: Fail build if no unity license set
25+
if: ${{ env.UNITY_LICENSE == '' }}
26+
uses: actions/github-script@v6
27+
with:
28+
script: |
29+
core.setFailed('No unity license secret set')
3130
32-
test-all-modes:
31+
test:
3332
name: Run EditMode and PlayMode Tests
3433
runs-on: ubuntu-latest
3534
needs: [check-license]
36-
if: ${{ needs.check-license.outputs.is_unity_license_set == 'true' }}
3735
strategy:
3836
fail-fast: true
3937
steps:
@@ -66,28 +64,27 @@ jobs:
6664
customParameters: -debugCodeOptimization
6765
coverageOptions: 'generateAdditionalMetrics'
6866

69-
- name: Upload Results
67+
- name: Publish Test Results
7068
uses: actions/[email protected]
7169
if: always()
7270
with:
7371
name: Test Results (All)
7472
path: ${{ steps.tests.outputs.artifactsPath }}
7573

76-
# - name: Upload XML report to Codecov
77-
# uses: codecov/codecov-action@v3
78-
# with:
79-
# name: Code Coverage Results (All)
80-
# flags: automated
81-
# token: ${{ secrets.CODECOV_TOKEN }}
82-
# files: CodeCoverage/**/*.xml
83-
# fail_ci_if_error: true
84-
# verbose: true
74+
# - name: Publish Code Coverage
75+
# uses: codecov/codecov-action@v3
76+
# with:
77+
# name: Code Coverage Results (All)
78+
# flags: automated
79+
# token: ${{ secrets.CODECOV_TOKEN }}
80+
# files: CodeCoverage/**/*.xml
81+
# fail_ci_if_error: true
82+
# verbose: true
8583

8684
build:
8785
name: Build for ${{ matrix.targetPlatform }}
8886
runs-on: ubuntu-latest
8987
needs: [check-license]
90-
if: ${{ needs.check-license.outputs.is_unity_license_set == 'true' }}
9188
strategy:
9289
fail-fast: false
9390
matrix:

0 commit comments

Comments
 (0)