Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
test:
name: build and test (${{ matrix.system }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- system: x86_64-linux
os: ubuntu-24.04
- system: aarch64-linux
os: ubuntu-24.04-arm
- system: aarch64-darwin
os: macos-26
steps:
- uses: actions/checkout@v6.0.2
- uses: cachix/install-nix-action@v31.10.1
- name: Build
run: nix build --no-write-lock-file --print-build-logs
- name: Test built package
run: nix develop --no-write-lock-file -c python3 test.py ./result/bin/fall
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,21 @@ ignored: remove old suffix text or replace it with a registered remote and optio

## Tests

The development shell provides Nushell, Python, and Git pinned by `flake.lock`.

```sh
nu codec-test.nu
nix shell --inputs-from . nixpkgs#python3 -c python3 cli-test.py
nix develop -c nu codec-test.nu
nix develop -c python3 test.py
nix build
nix shell --inputs-from . nixpkgs#python3 -c python3 cli-test.py ./result/bin/fall
nix develop -c python3 test.py ./result/bin/fall
```

The CLI suite uses temporary configurations and repositories, including a
worktree, and checks exit codes, diagnostics, boundaries, and state preservation.
Without an argument, `test.py` runs `fall.nu` with Nushell from PATH; with an
executable path, it tests that executable instead. Pull request CI builds the
package and tests `result/bin/fall` once on each supported system
(`x86_64-linux`, `aarch64-linux`, and `aarch64-darwin`).

## After Uninstall

Expand Down
10 changes: 10 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
);
in
{
devShells = forAllSys (pkgs: {
default = pkgs.mkShell {
packages = [
pkgs.nushell
pkgs.python3
pkgs.gitMinimal
];
};
});

packages = forAllSys (pkgs: {
default = pkgs.stdenvNoCC.mkDerivation {
pname = "fall";
Expand Down
2 changes: 1 addition & 1 deletion cli-test.py → test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Isolated integration spec: python3 cli-test.py [installed-fall]."""
"""Isolated integration spec: python3 test.py [installed-fall]."""
import os
import json
from pathlib import Path
Expand Down
Loading