Split up Unlighthouse Runs + Build Site in release test step + fix pull request actions
All checks were successful
Run Tests on Code / test (push) Successful in 16s

This commit is contained in:
Neshura 2024-01-02 03:30:14 +01:00
parent 806e4f1277
commit 8ae350db27
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 26 additions and 18 deletions

View file

@ -54,11 +54,17 @@ jobs:
echo "Version is: '$VERSION'"; echo "Version is: '$VERSION'";
fi fi
- name: Run Unlighthouse Test - name: Build Site
run: | run: yarn build
yarn dev &
unlighthouse-ci --build-static --desktop --outputPath reports/desktop - name: Start Dev Server
unlighthouse-ci --build-static --mobile --outputPath reports/mobile 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 - name: Uploading Lighthouse Reports
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View file

@ -29,10 +29,15 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: yarn install run: yarn install
- name: Add Unlighthouse - name: Install Chromium for Unlighthouse
run: | run: |
echo "apt update && apt install -y chromium" echo "apt update && apt install -y chromium"
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" echo "yarn global add @unlighthouse/cli"
yarn global add @unlighthouse/cli yarn global add @unlighthouse/cli
@ -50,20 +55,17 @@ jobs:
echo "Version is: '$VERSION'"; echo "Version is: '$VERSION'";
fi fi
- name: Build website - name: Build Site
run: yarn build run: yarn build
- name: Install Chromium for Unlighthouse - name: Start Dev Server
run: | run: yarn preview &
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 - name: Run Unlighthouse for Desktop
run: | run: unlighthouse-ci --build-static --desktop --outputPath reports/desktop
echo "yarn global add @unlighthouse/cli"
yarn global add @unlighthouse/cli - name: Run Unlighthouse for Mobile
run: unlighthouse-ci --build-static --mobile --outputPath reports/mobile
- name: Uploading Lighthouse Reports - name: Uploading Lighthouse Reports
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3