Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh: enable tests #110485

Merged
merged 1 commit into from Jan 22, 2021
Merged

gh: enable tests #110485

merged 1 commit into from Jan 22, 2021

Conversation

drewrisinger
Copy link
Contributor

@drewrisinger drewrisinger commented Jan 22, 2021

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@zowoq
Copy link
Contributor

zowoq commented Jan 22, 2021

gitAndTools.gh is an alias now, can you change the commit to gh please?

Comment on lines +39 to +41
checkPhase = ''
make test
'';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires a custom checkPhase b/c it uses a custom buildPhase/installPhase, so some of the shell functions (i.e. getGoDirs()) that the buildGoModule.checkPhase expects are missing.

@drewrisinger drewrisinger changed the title gitAndTools.gh: enable tests gh: enable tests Jan 22, 2021
@ofborg ofborg bot requested review from kalbasit and zowoq January 22, 2021 14:21
Copy link
Contributor

@zowoq zowoq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes on darwin/nixos.

@ofborg ofborg bot requested a review from zowoq January 22, 2021 14:42
@zowoq zowoq merged commit c7deb49 into NixOS:master Jan 22, 2021
@drewrisinger drewrisinger deleted the dr-pr-gh-enable-tests branch January 22, 2021 15:36
@Izorkin
Copy link
Contributor

Izorkin commented Jan 25, 2021

gh build error occurs after this update:

ok      github.com/cli/cli/pkg/cmd/issue/shared 0.053s
ok      github.com/cli/cli/pkg/cmd/issue/status 0.042s
--- FAIL: TestIssueView_tty_Preview (0.00s)
    --- FAIL: TestIssueView_tty_Preview/Open_issue_without_metadata (0.00s)
        view_test.go:263: output did not match regexp /Open.*marseilles opened about 9 years ago.*9 comments/
            > output
            ix of coins
            Open • marseilles opened about 10 years ago • 9 comments


              **bold story**


            ———————— Not showing 9 comments ————————


            Use --comments to view the full conversation
            View this issue on GitHub: https://github.com/OWNER/REPO/issues/123

    --- FAIL: TestIssueView_tty_Preview/Open_issue_with_metadata (0.00s)
        view_test.go:263: output did not match regexp /Open.*marseilles opened about 9 years ago.*9 comments/
            > output
            ix of coins
            Open • marseilles opened about 10 years ago • 9 comments
            8 😕 • 7 👀 • 6 ❤️ • 5 🎉 • 4 😄 • 3 🚀 • 2 👎 • 1 👍
            Assignees: marseilles, monaco
            Labels: one, two, three, four, five
            Projects: Project 1 (column A), Project 2 (column B), Project 3 (column C), Project 4 (Awaiting triage)
            Milestone: uluru


              **bold story**


            ———————— Not showing 9 comments ————————


            Use --comments to view the full conversation
            View this issue on GitHub: https://github.com/OWNER/REPO/issues/123

    --- FAIL: TestIssueView_tty_Preview/Open_issue_with_empty_body (0.00s)
        view_test.go:263: output did not match regexp /Open.*marseilles opened about 9 years ago.*9 comments/
            > output
            ix of coins
            Open • marseilles opened about 10 years ago • 9 comments
            Labels: tarot


              No description provided


            ———————— Not showing 9 comments ————————


            Use --comments to view the full conversation
            View this issue on GitHub: https://github.com/OWNER/REPO/issues/123

    --- FAIL: TestIssueView_tty_Preview/Closed_issue (0.00s)
        view_test.go:263: output did not match regexp /Closed.*marseilles opened about 9 years ago.*9 comments/
            > output
            ix of coins
            Closed • marseilles opened about 10 years ago • 9 comments
            Labels: tarot


              **bold story**


            ———————— Not showing 9 comments ————————


            Use --comments to view the full conversation
            View this issue on GitHub: https://github.com/OWNER/REPO/issues/123

FAIL
FAIL    github.com/cli/cli/pkg/cmd/issue/view   0.058s
?       github.com/cli/cli/pkg/cmd/pr   [no test files]
ok      github.com/cli/cli/pkg/cmd/pr/checkout  0.076s
ok      github.com/cli/cli/pkg/cmd/pr/checks    0.058s

Building with nix.useSandbox = true;

@zowoq
Copy link
Contributor

zowoq commented Jan 25, 2021

Reverted in a7dda29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants