mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-11-25 14:17:31 +08:00
Six workflows had no permissions block and ran on whatever the repository default grants. They get contents: read at the workflow level. The three perf-fmt jobs pull ghcr.io/lightpanda-io/perf-fmt, a private image, with GITHUB_TOKEN, so they keep packages: read on top of it. No job in these workflows writes to the repository. actions/checkout leaves the job token in .git/config by default, where every later step and tool in the job can read it. Every checkout opts out except the three whose job pushes a branch with that token: the orderfile regen and the two nix dependency updates keep theirs. The Debian package build ran in debian:stable-slim, a tag that moves with every Debian point release. It is pinned to the current index digest, with the tag kept next to it for readability.
92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
name: e2e-integration-test
|
|
|
|
env:
|
|
LIGHTPANDA_DISABLE_TELEMETRY: true
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "4 4 * * *"
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
zig-build-release:
|
|
name: zig build release
|
|
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
# Don't run the CI with draft PR.
|
|
if: github.event.pull_request.draft == false
|
|
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
|
|
- uses: ./.github/actions/install
|
|
|
|
- name: zig build release
|
|
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=fast -Dcpu=x86_64
|
|
|
|
- name: upload artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: lightpanda-build-release
|
|
path: |
|
|
zig-out/bin/lightpanda
|
|
retention-days: 1
|
|
|
|
demo-scripts:
|
|
name: demo-integration-scripts
|
|
needs: zig-build-release
|
|
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
repository: 'lightpanda-io/demo'
|
|
fetch-depth: 0
|
|
|
|
- run: npm install
|
|
|
|
- name: download artifact
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: lightpanda-build-release
|
|
|
|
- run: chmod a+x ./lightpanda
|
|
|
|
- name: LP Cache
|
|
id: lp-cache
|
|
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
|
|
with:
|
|
path: /tmp/lp-cache
|
|
key: v1
|
|
|
|
- name: run end to end integration tests
|
|
continue-on-error: true
|
|
run: |
|
|
./lightpanda serve --http-cache-dir /tmp/lp-cache --http-proxy ${{ secrets.MASSIVE_PROXY_RESIDENTIAL_US }} --log-level error & echo $! > LPD.pid
|
|
go run integration/main.go |tee result.log
|
|
kill `cat LPD.pid`
|
|
|
|
- name: Send result to slack
|
|
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
|
|
with:
|
|
errors: true
|
|
method: files.uploadV2
|
|
token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
|
|
payload: |
|
|
channel_id: ${{ vars.E2E_SLACK_CHANNEL_ID }}
|
|
initial_comment: "Last e2e integration tests"
|
|
file: "./result.log"
|
|
filename: "e2e-integration-${{ github.sha }}.txt"
|