mirror of
https://github.com/readest/readest
synced 2026-04-21 13:37:44 +00:00
Bumps the github-actions group with 2 updates: [pnpm/action-setup](https://github.com/pnpm/action-setup) and [actions/github-script](https://github.com/actions/github-script). Updates `pnpm/action-setup` from 5 to 6 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v5...v6) Updates `actions/github-script` from 8 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v8...v9) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
155 lines
4.3 KiB
YAML
155 lines
4.3 KiB
YAML
name: PR checks
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
jobs:
|
|
rust_lint:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTFLAGS: '-C target-cpu=skylake'
|
|
SCCACHE_GHA_ENABLED: 'true'
|
|
RUSTC_WRAPPER: sccache
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: 'true'
|
|
- name: setup sccache
|
|
uses: mozilla-actions/sccache-action@v0.0.9
|
|
- 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: Cache apt packages
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: /var/cache/apt/archives
|
|
key: apt-rust-lint-${{ runner.os }}
|
|
- 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 check
|
|
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
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: setup pnpm
|
|
uses: pnpm/action-setup@v6
|
|
|
|
- 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-web-${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
nextjs-web-${{ github.sha }}-
|
|
nextjs-web-
|
|
|
|
- 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
|
|
working-directory: apps/readest-app
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: run web tests
|
|
working-directory: apps/readest-app
|
|
run: pnpm test:pr:web
|
|
|
|
- name: run lint
|
|
working-directory: apps/readest-app
|
|
run: |
|
|
pnpm lint
|
|
|
|
- name: build the web app
|
|
working-directory: apps/readest-app
|
|
run: |
|
|
pnpm build-web && pnpm check:all
|
|
|
|
build_tauri_app:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SCCACHE_GHA_ENABLED: 'true'
|
|
RUSTC_WRAPPER: sccache
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: setup pnpm
|
|
uses: pnpm/action-setup@v6
|
|
|
|
- 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-tauri-${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
nextjs-tauri-${{ github.sha }}-
|
|
nextjs-tauri-
|
|
|
|
- name: install Dependencies
|
|
working-directory: apps/readest-app
|
|
run: |
|
|
pnpm install && pnpm setup-vendors
|
|
|
|
- name: setup sccache
|
|
uses: mozilla-actions/sccache-action@v0.0.9
|
|
|
|
- name: install Rust toolchain
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: tauri-cargo
|
|
cache-all-crates: 'true'
|
|
|
|
- name: Cache apt packages
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: /var/cache/apt/archives
|
|
key: apt-tauri-${{ runner.os }}
|
|
- 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 xvfb
|
|
|
|
- name: run tauri tests
|
|
working-directory: apps/readest-app
|
|
run: xvfb-run pnpm test:pr:tauri
|