Compare commits
No commits in common. "main" and "0.1.2" have entirely different histories.
4 changed files with 7 additions and 37 deletions
|
@ -19,7 +19,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: forgejo.neshweb.net/ci-docker-images/unlighthouse:${{ github.ref_name }}, forgejo.neshweb.net/ci-docker-images/unlighthouse:latest
|
tags: forgejo.neshweb.net/ci-docker-images/unlighthouse-docker:${{ github.ref_name }}, forgejo.neshweb.net/ci-docker-images/unlighthouse-docker:latest
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build]
|
needs: [build]
|
||||||
|
@ -27,7 +27,7 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- name: Release New Version
|
- name: Release New Version
|
||||||
uses: actions/forgejo-release@v2
|
uses: actions/forgejo-release@v1
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
url: https://forgejo.neshweb.net
|
url: https://forgejo.neshweb.net
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
.vscode/*
|
|
|
@ -1,15 +1,13 @@
|
||||||
FROM node:20.14.0-bookworm
|
FROM node:20.10.0-bookworm
|
||||||
|
|
||||||
LABEL authorname="firq"
|
LABEL authorname="firq"
|
||||||
LABEL description="unlighthouse container for ci-based lighthouse testing"
|
|
||||||
WORKDIR /unlighthouse
|
WORKDIR /unlighthouse
|
||||||
|
|
||||||
# renovate: datasource=repology depName=debian_12/chromium versioning=loose
|
# renovate: datasource=repology depName=debian_12/chromium versioning=loose
|
||||||
ENV CHROMIUM_VERSION="130.0.6723.58-1~deb12u1"
|
ENV CHROMIUM_VERSION="120.0.6099.129-1~deb12u1"
|
||||||
ENV NODE_ENV='production'
|
ENV NODE_ENV='production'
|
||||||
|
|
||||||
# Update path so executable can be run globally
|
# Update path so executable can be run globally
|
||||||
ENV PATH="/unlighthouse/node_modules/.bin:${PATH}"
|
ENV PATH="/unlighthouse/node_modules/.bin:${PATH}"
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install --no-install-recommends chromium=${CHROMIUM_VERSION} procps && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get -y install --no-install-recommends chromium=${CHROMIUM_VERSION} procps && rm -rf /var/lib/apt/lists/*
|
||||||
RUN npm install @unlighthouse/cli@0.14.0 puppeteer
|
RUN npm install @unlighthouse/cli puppeteer
|
||||||
|
|
31
README.md
31
README.md
|
@ -1,30 +1,3 @@
|
||||||
# unlighthouse Docker Image
|
# Docker image to run lighthouse, but without non-privileged user
|
||||||
|
|
||||||
Image based on `node:20.10.0-bookworm` with `chromium` and `unlighthouse` preinstalled.
|
Uses the full node:20-bookwork image instead of slim due to issues with GitLab lighthouse Docker
|
||||||
|
|
||||||
It can be used for benchmarking a given site with lighthouse and to generate corresponding reports with ease.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
The unlighthouse cli can be used by running the command `unlighthouse` inside the container
|
|
||||||
|
|
||||||
```shell
|
|
||||||
unlighthouse-ci --site "https://preview.firq.dev/"
|
|
||||||
```
|
|
||||||
|
|
||||||
It is recommended to provide a `unlighthouse.config.ts` to reduce the amount of CLI arguments needed.
|
|
||||||
|
|
||||||
An example config can be found here:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
export default {
|
|
||||||
puppeteerOptions: {
|
|
||||||
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
|
||||||
},
|
|
||||||
ci: {
|
|
||||||
budget: 90,
|
|
||||||
buildStatic: true
|
|
||||||
},
|
|
||||||
outputPath: "unlighthouse-reports",
|
|
||||||
}
|
|
||||||
```
|
|
Loading…
Reference in a new issue