readest/.github/workflows/pull-request.yml
Huang Xin 93b96d64eb
fix(sidebar): use position fixed and transform for mobile sidebar (#3490)
* chore: bump nodejs version to 24

* fix(sidebar): use position fixed and transform for mobile sidebar

Use position: fixed to prevent horizontal scrolling on the mobile
bottom sheet, and replace style.top with transform: translateY() for
smooth drag performance. Cache element refs to avoid
document.querySelector on every drag frame. Apply the same position:
fixed fix to the notebook panel. Closes #3492

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:04:37 +01:00

115 lines
3.4 KiB
YAML

name: PR checks
on:
pull_request:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
rust_lint:
runs-on: ubuntu-latest
env:
RUSTFLAGS: '-C target-cpu=skylake'
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
- name: Install minimal stable with clippy and rustfmt
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libfontconfig-dev libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libsoup-3.0-dev
- name: Format
working-directory: apps/readest-app/src-tauri
run: cargo fmt --check
- name: Clippy Check
working-directory: apps/readest-app/src-tauri
run: cargo clippy -p Readest --no-deps -- -D warnings
build_web_app:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- platform: 'web'
- platform: 'tauri'
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
- name: setup pnpm
uses: pnpm/action-setup@v4
- name: setup node
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: cache Next.js build
uses: actions/cache@v5
with:
path: apps/readest-app/.next/cache
key: nextjs-${{ matrix.config.platform }}-${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
nextjs-${{ matrix.config.platform }}-${{ github.sha }}-
nextjs-${{ matrix.config.platform }}-
- name: install Dependencies
working-directory: apps/readest-app
run: |
pnpm install && pnpm setup-vendors
- name: run format check
run: |
pnpm format:check || (pnpm format && git diff && exit 1)
- name: install playwright browsers
if: matrix.config.platform == 'web'
working-directory: apps/readest-app
run: npx playwright install --with-deps chromium
- name: run web tests
if: matrix.config.platform == 'web'
working-directory: apps/readest-app
run: pnpm test:pr:web
- name: install Rust toolchain
if: matrix.config.platform == 'tauri'
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- if: matrix.config.platform == 'tauri'
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.config.platform }}-cargo
- name: install system dependencies (tauri)
if: matrix.config.platform == 'tauri'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libfontconfig-dev libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libsoup-3.0-dev xvfb
- name: run tauri tests
if: matrix.config.platform == 'tauri'
working-directory: apps/readest-app
run: xvfb-run pnpm test:pr:tauri
- name: run lint
if: matrix.config.platform == 'web'
working-directory: apps/readest-app
run: |
pnpm lint
- name: build the web app
if: matrix.config.platform == 'web'
working-directory: apps/readest-app
run: |
pnpm build-web && pnpm check:all