X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=.github%2Fworkflows%2Fstats.yml;h=968eb961234f1143d820550277672b59798ce4a1;hb=c55d76206cd462bad7eadd0c96f1ef5b3c629f9f;hp=b5fb6d2a6ed25b23d039dbdc151e371db9718a37;hpb=2abaa3f27ec9870749a3a6f001922740e26c3830;p=github%2FChocobozzz%2FPeerTube.git diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index b5fb6d2a6..968eb9612 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -5,6 +5,7 @@ on: branches: - develop - ci + - next pull_request: types: [synchronize, opened] @@ -44,23 +45,31 @@ jobs: branch-base: develop bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} + - name: PeerTube code stats + if: github.event_name != 'pull_request' + run: | + wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip" + unzip "scc-3.0.0-x86_64-unknown-linux.zip" + ./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 + - name: PeerTube client stats if: github.event_name != 'pull_request' run: | node dist/scripts/client-build-stats.js > client-build-stats.json - - name: PeerTube code stats + - name: PeerTube client lighthouse report if: github.event_name != 'pull_request' run: | - wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip" - unzip "scc-3.0.0-x86_64-unknown-linux.zip" - ./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 + sudo apt-get install chromium-browser + sudo npm install -g lighthouse + lighthouse --chrome-flags="--headless" https://peertube2.cpy.re --output=json --output-path=./lighthouse.json - name: Display stats if: github.event_name != 'pull_request' run: | cat client-build-stats.json cat scc.json + cat lighthouse.json - name: Upload stats if: github.event_name != 'pull_request' @@ -86,5 +95,5 @@ jobs: if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then echo "Uploading files" - scp client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; + scp lighthouse.json client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; fi