aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-27 08:13:33 +0200
committerChocobozzz <me@florianbigard.com>2021-05-27 09:15:29 +0200
commitbfe6e0d9f78f92194087d072711dfc2905f30575 (patch)
treeb683259c921940fcee94c181e182f3bdc8ae99df /.github
parent35f676e5d3e5e242e84ed63da2cc78117079c7cb (diff)
downloadPeerTube-bfe6e0d9f78f92194087d072711dfc2905f30575.tar.gz
PeerTube-bfe6e0d9f78f92194087d072711dfc2905f30575.tar.zst
PeerTube-bfe6e0d9f78f92194087d072711dfc2905f30575.zip
Add lighthouse to github action
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/stats.yml18
1 files changed, 13 insertions, 5 deletions
diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml
index a2f0945b3..968eb9612 100644
--- a/.github/workflows/stats.yml
+++ b/.github/workflows/stats.yml
@@ -45,23 +45,31 @@ jobs:
45 branch-base: develop 45 branch-base: develop
46 bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} 46 bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
47 47
48 - name: PeerTube code stats
49 if: github.event_name != 'pull_request'
50 run: |
51 wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip"
52 unzip "scc-3.0.0-x86_64-unknown-linux.zip"
53 ./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,yarn.lock,client/yarn.lock,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,server/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json
54
48 - name: PeerTube client stats 55 - name: PeerTube client stats
49 if: github.event_name != 'pull_request' 56 if: github.event_name != 'pull_request'
50 run: | 57 run: |
51 node dist/scripts/client-build-stats.js > client-build-stats.json 58 node dist/scripts/client-build-stats.js > client-build-stats.json
52 59
53 - name: PeerTube code stats 60 - name: PeerTube client lighthouse report
54 if: github.event_name != 'pull_request' 61 if: github.event_name != 'pull_request'
55 run: | 62 run: |
56 wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip" 63 sudo apt-get install chromium-browser
57 unzip "scc-3.0.0-x86_64-unknown-linux.zip" 64 sudo npm install -g lighthouse
58 ./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,yarn.lock,client/yarn.lock,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,server/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json 65 lighthouse --chrome-flags="--headless" https://peertube2.cpy.re --output=json --output-path=./lighthouse.json
59 66
60 - name: Display stats 67 - name: Display stats
61 if: github.event_name != 'pull_request' 68 if: github.event_name != 'pull_request'
62 run: | 69 run: |
63 cat client-build-stats.json 70 cat client-build-stats.json
64 cat scc.json 71 cat scc.json
72 cat lighthouse.json
65 73
66 - name: Upload stats 74 - name: Upload stats
67 if: github.event_name != 'pull_request' 75 if: github.event_name != 'pull_request'
@@ -87,5 +95,5 @@ jobs:
87 95
88 if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then 96 if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then
89 echo "Uploading files" 97 echo "Uploading files"
90 scp client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; 98 scp lighthouse.json client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats;
91 fi 99 fi