From 8ae350db27205332af8aa1a12d45b623015c6145 Mon Sep 17 00:00:00 2001 From: Neshura Date: Tue, 2 Jan 2024 03:30:14 +0100 Subject: [PATCH] Split up Unlighthouse Runs + Build Site in release test step + fix pull request actions --- .forgejo/workflows/build+release.yml | 18 ++++++++++++------ .forgejo/workflows/pull-requests.yml | 26 ++++++++++++++------------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 7bac889..70a731d 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -52,13 +52,19 @@ jobs: exit 1 else echo "Version is: '$VERSION'"; - fi + fi - - name: Run Unlighthouse Test - run: | - yarn dev & - unlighthouse-ci --build-static --desktop --outputPath reports/desktop - unlighthouse-ci --build-static --mobile --outputPath reports/mobile + - name: Build Site + run: yarn build + + - name: Start Dev Server + run: yarn preview & + + - name: Run Unlighthouse for Desktop + run: unlighthouse-ci --build-static --desktop --outputPath reports/desktop + + - name: Run Unlighthouse for Mobile + run: unlighthouse-ci --build-static --mobile --outputPath reports/mobile - name: Uploading Lighthouse Reports uses: actions/upload-artifact@v3 diff --git a/.forgejo/workflows/pull-requests.yml b/.forgejo/workflows/pull-requests.yml index 2a8ae98..f123e4a 100644 --- a/.forgejo/workflows/pull-requests.yml +++ b/.forgejo/workflows/pull-requests.yml @@ -29,10 +29,15 @@ jobs: - name: Install Dependencies run: yarn install - - name: Add Unlighthouse + - name: Install Chromium for Unlighthouse run: | echo "apt update && apt install -y chromium" apt update && apt install -y chromium + echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox" >> /etc/chromium.d/default-flags' + echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox"' >> /etc/chromium.d/default-flags + + - name: Add Unlighthouse + run: | echo "yarn global add @unlighthouse/cli" yarn global add @unlighthouse/cli @@ -50,20 +55,17 @@ jobs: echo "Version is: '$VERSION'"; fi - - name: Build website + - name: Build Site run: yarn build - - name: Install Chromium for Unlighthouse - run: | - echo "apt update && apt install -y chromium" - apt update && apt install -y chromium - echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox" >> /etc/chromium.d/default-flags' - echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox"' >> /etc/chromium.d/default-flags + - name: Start Dev Server + run: yarn preview & - - name: Add Unlighthouse - run: | - echo "yarn global add @unlighthouse/cli" - yarn global add @unlighthouse/cli + - name: Run Unlighthouse for Desktop + run: unlighthouse-ci --build-static --desktop --outputPath reports/desktop + + - name: Run Unlighthouse for Mobile + run: unlighthouse-ci --build-static --mobile --outputPath reports/mobile - name: Uploading Lighthouse Reports uses: actions/upload-artifact@v3