-
-
Notifications
You must be signed in to change notification settings - Fork 242
86 lines (71 loc) · 2.67 KB
/
mainui.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
name: Main UI
on:
pull_request:
branches: [ main ]
paths: bundles/org.openhab.ui/web/**
workflow_dispatch:
defaults:
run:
working-directory: bundles/org.openhab.ui/web
jobs:
checks:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: node_modules # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run ESLint
run: npm run lint
webpack-stats:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Cache node modules
id: cache
uses: actions/cache@v3
with:
path: node_modules # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build and generate report
run: npm run webpack-analyzer-report-stats
- uses: actions/upload-artifact@v3
with:
name: report
path: /home/runner/work/openhab-webui/openhab-webui/bundles/org.openhab.ui/web/report.html
- name: Upload stats to RelativeCI
run: npx relative-ci-agent
env:
# was: RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
# but wouldn't work for PRs made from forks...
# Bad practice (!), however since the service itself as well as
# what can be done with the key (add new bundle stats) is not
# critical, not hiding the key is deemed acceptable for now!
RELATIVE_CI_KEY: f8e0e450-804c-11eb-b7f5-510e2634a5c9