-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (88 loc) · 2.49 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-package:
runs-on: ubuntu-latest
strategy:
matrix:
version: [2020.3.48f1, 2021.3.40f1, 2022.3.36f1, 6000.0.9f1]
steps:
- uses: willykc/unity-package-tester@v3
id: test
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
unityVersion: ${{ matrix.version }}
testMode: editmode
artifactsPath: 'artifacts/${{ matrix.version }}'
scopedRegistries: |
{
"name": "openupm",
"url": "https://package.openupm.com",
"scopes": [
"org.nuget"
]
}
coverageOptions: "generateAdditionalMetrics;\
generateHtmlReport;\
generateBadgeReport;\
assemblyFilters:+Willykc.Templ.Editor;\
pathFilters:\
+**/Entry/**,\
+**/Scaffold/**,\
-**/*Editor.cs,\
-**/*View.cs,\
-**/*ViewItem.cs,\
-**/*Menu.cs,\
-**/*Dialog.cs,\
-**/*Form.cs,\
-**/*Manager.cs,\
-**/*Processor.cs,\
-**/*Entry.cs"
githubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: 'coverage-${{ matrix.version }}'
path: ${{ steps.test.outputs.coveragePath }}
retention-days: 1
merge-coverage:
runs-on: ubuntu-latest
needs: test-package
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: full-coverage
pattern: coverage-*
publish-coverage:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
environment:
name: coverage-report
url: ${{ steps.deployment.outputs.page_url }}
needs: merge-coverage
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
name: full-coverage
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './Report'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4