mtp/.forgejo/workflows/ci.yml
Alois 0dd6a0e363
All checks were successful
CI / checks (push) Successful in 6m14s
(fix): ci workflow
2026-06-28 17:42:15 +02:00

49 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: docker
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Install Nix
run: |
apt-get update && apt-get install -y --no-install-recommends ca-certificates curl xz-utils
curl -L https://nixos.org/nix/install | sh -s -- --daemon
- name: Run checks
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
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 build wasm --target web
RUSTFLAGS="--cfg web_sys_unstable_apis" pnpm run build
pnpm --filter mtp-web-client run build
(
cd example
export MTP_TYPE_MAPS="$PWD/type-maps.yaml"
cargo check --workspace --all-targets --all-features
)
'