53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
NIX_CONFIG: experimental-features = nix-command flakes
|
|
|
|
jobs:
|
|
checks:
|
|
name: checks
|
|
runs-on: nixos
|
|
steps:
|
|
- name: Install node
|
|
run: nix profile add nixpkgs#nodejs_24
|
|
|
|
- name: Checkout
|
|
uses: https://data.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Run checks
|
|
run: |
|
|
nix develop --command bash -c '
|
|
set -euo pipefail
|
|
|
|
cargo fmt --all --check
|
|
cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings -W unreachable-pub
|
|
cargo test --workspace --exclude mtp-wasm --all-features
|
|
RUSTFLAGS="--cfg web_sys_unstable_apis" cargo build -p mtp-wasm --target wasm32-unknown-unknown
|
|
cargo deny check advisories bans sources
|
|
cargo machete
|
|
|
|
pnpm install --frozen-lockfile
|
|
pnpm run dup
|
|
|
|
RUSTFLAGS="--cfg web_sys_unstable_apis" wasm-pack test --node wasm
|
|
RUSTFLAGS="--cfg web_sys_unstable_apis" wasm-pack build wasm --target web
|
|
RUSTFLAGS="--cfg web_sys_unstable_apis" pnpm run build
|
|
pnpm --filter mtp-web-client run build
|
|
|
|
node test/e2ee.mjs
|
|
pnpm run test:secrets
|
|
pnpm run test:types
|
|
pnpm run check:boundary
|
|
|
|
(
|
|
cd example
|
|
export MTP_TYPE_MAPS="$PWD/type-maps.yaml"
|
|
cargo check --workspace --all-targets --all-features
|
|
)
|
|
'
|