Giter Site home page Giter Site logo

nixpkgs-check's Introduction

nixpkgs-check

nixpkgs-check is a tool to make it easier to run through the usual checklist for PRs to nixpkgs.

Usage

Usually, usage will simply be:

nixpkgs-check

In this case, nixpkgs-check will automatically check the current commit against master.

If you have more complex needs, you can specify revisions with:

nixpkgs-check -b [base-branch] [revision-to-check]

nixpkgs-check will automatically figure out what commits need to be tested.

Once started, just follow the prompts. Multiple-choice questions can be selected by pressing the space bar to (un)select a choice, and enter to validate the choice list.

When it finishes running, nixpkgs-check outputs a report in GitHub-flavored markdown, that can be copy-pasted into the pull request message.

Note that nixpkgs-check stores some state in $XDG_DATA_HOME/nixpkgs-check/state.json, which remembers previous interactions to improve future interactions.

Report color code

The report uses emojis as color code:

  • 💚 means that there was a significant improvement with this commit
  • ✔ means that this test looks good
  • 😢 means that this test's result should be considered by a human
  • ❌ means that there was a regression with this test

Development

You can build the current version of nixpkgs-check using nix-build at the root of the repository.

However, for development it is often easier to just use cargo build, as it has way better incrementality. In these circumstances, it is possible to build using a command line like the following:

CONTRIBUTING_MD_PATH="$NIXPKGS_FULL_PATH/.github/CONTRIBUTING.md" cargo build

Note that the CONTRIBUTING.md file will be embedded directly in nixpkgs-check, so that the user can review potential changes to it while the repositories are still being checked out. The only drawback of this approach is that nixpkgs-check will have to be rebuilt when CONTRIBUTING.md changes, which should not be a problem given it can be in the nixpkgs monorepo.

nixpkgs-check's People

Contributors

ekleog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nixpkgs-check's Issues

Build errors

Not sure the cause, could be i'm using it wrong:

[tom@tom:~/nixpkgs-check]$ ./result/bin/nixpkgs-check -b master --repo-path ~/nixpkgs refs/remotes/origin/pull/117637/head
✔ which packages do you want to test? · parallel
✔ what other packages do you want to test? [empty to stop] ·
✔ on what machines did you already attempt building? [space to select, enter to validate] ·
✔ what other manual tests did you run? [empty to stop] ·
running base version of environment
running base version of ask-package-names
running base version of ask-other-tests
running to-check version of environment
running to-check version of ask-package-names
running to-check version of ask-other-tests
running base version of build(parallel)
error: '((import ./. { overlays = []; }).parallel)' is not a valid URL
running to-check version of build(parallel)
error: '((import ./. { overlays = []; }).parallel)' is not a valid URL
pruning the no-longer-existing worktrees


Report to be pasted in the PR message
-------------------------------------

### nixpkgs-check report

**version:** `nixpkgs-check v0.1.0` on NixOS 21.05.20210319.f5e8bdd with sandboxing
**packages declared changed:** {"parallel"}
**manual tests declared performed:**
 * 😢 not built on NixOS
 * 😢 not built on MacOS
 * 😢 not built on Other Linux distributions

**package parallel:** 😢 still does not build

Save the state to not have to re-answer questions on re-runs

Idea: json file that holds the (base, to-check) refs and the list of question answers. Load the file on startup and reuse the data if it's already there.

Also needs a way to change the answers if need be.

Also GC entries older than eg. 1 month

Try auto-running desktop files

There's a tool (dex?) that allows setting desktop files.

This can reuse the infra of #5 but will need $out/bin to be made available in the path because desktop files are usually relying on that.

Remember which options were last given to which binaries

This can be useful both in a single run (because we run binaries twice), but also across runs, because the option list usually won't change even if the package version changes a lot.

Actually… it might even make sense to include a shared list, and a command to export that list, so that we could provide better defaults by accepting PRs from people who have recorded their own defaults?

fails on libs

running to-check version of run-binaries(dovecot_fts_xapian)
error:  No such file or directory (os error 2)
  while listing the base binaries for dovecot_fts_xapian
  while running check run-binaries(dovecot_fts_xapian) on to-check version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.