mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Precommit
|
|
|
|
on:
|
|
push:
|
|
branches: ["master", "web-prod"]
|
|
pull_request:
|
|
branches: ["master"]
|
|
merge_group:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
precommit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: extractions/setup-just@v2
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: ".node-version"
|
|
cache: 'pnpm'
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- name: Install `pandoc`
|
|
run: sudo apt-get update && sudo apt-get install pandoc -y
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2.7.8
|
|
- uses: cargo-bins/cargo-binstall@main
|
|
- name: Install `wasm-pack`
|
|
run: cargo binstall wasm-pack --force --no-confirm
|
|
- name: Install `cargo hack`
|
|
run: cargo binstall cargo-hack --force --no-confirm
|
|
- name: Run `cargo-hack`
|
|
run: cargo hack check --each-feature
|
|
- name: Precommit
|
|
run: just precommit
|