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

Switch testing from a shell script to spec #68

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5b784e
Ignore other nix results
adetokunbo Mar 13, 2019
d50ee15
Step 1 - add new test project
adetokunbo Mar 11, 2019
fbd599f
Step 2 - add hspec test that mirrors a shell test
adetokunbo Mar 14, 2019
7f90ec1
Switch the yonbanme integration test from shell to hspec
adetokunbo Mar 14, 2019
cd47a71
Switch the rokubanme test from shell to hspec
adetokunbo Mar 14, 2019
495e9a6
Switch the nanabanme test from shell to hspec
adetokunbo Mar 14, 2019
de59b99
Switch the hachibanme test from shell to hspec
adetokunbo Mar 15, 2019
bee4d9d
Switch the kyuubanme test from shell to hspec
adetokunbo Mar 15, 2019
0922d0c
Switch the ichibanme-no-yagai test from shell to hspec
adetokunbo Mar 15, 2019
2f08568
Switch the gobanme-no-yagai test from shell to hspec
adetokunbo Mar 15, 2019
9272a23
Remove some shell tests that wont be repeated in hspec
adetokunbo Mar 15, 2019
172821a
Re-enable circleci integration tests with the new test command
adetokunbo Mar 16, 2019
553812e
Test: check if updating ownership corrects the CI failure
adetokunbo May 8, 2019
c5c3fc9
Correct a nix-expr error
adetokunbo May 8, 2019
d0586db
Install nix 2.2.1 on CircleCI
adetokunbo May 8, 2019
b67172d
Another experiment with ownership of /nix on circleci
adetokunbo May 9, 2019
caca224
Install nix-prefetch-scripts rather than just nix-prefetch-git
adetokunbo May 9, 2019
e13d640
Restore changing the nix ownership to circleci with an explanation
adetokunbo May 9, 2019
a72d494
Correct the chown command
adetokunbo May 9, 2019
8c2efc9
Configure travis
adetokunbo May 9, 2019
56fe9af
Pin the version of nixpkgs in the tests
adetokunbo May 9, 2019
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
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ aliases: &build
- checkout

- run:
name: create a fake /nix
command: sudo mkdir -m 0755 /nix && sudo chown circleci /nix
name: create a fake /nix, enable single-user install of nix as user circleci
command: sudo mkdir -m 0777 /nix && sudo chown -R circleci /nix

# Restore the nix installation to its state after the previous test run.
# This should prevent unnecessary rebuilds of dependencies without impacting
Expand All @@ -31,17 +31,17 @@ aliases: &build
name: install nix
command: |
[[ -d ~/.nix-defexpr ]] ||
curl https://nixos.org/nix/install | sh
curl https://nixos.org/releases/nix/nix-2.2.1/install | sh

- run:
name: install nix dependencies used in the test script itself
command: |
nix-env -i cabal2nix
nix-env -i nix-prefetch-git
nix-env -i nix-prefetch-scripts

- run:
name: run the tests (temporarily - just build to reset the cache)
command: nix-build --show-trace build.nix
name: run the tests
command: nix-shell --run 'cabal new-test haskell-overridez-tests'

# Save /nix and the nix user folders to the cache.

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# haskell development
result
result*
.ghc*
dist
dist-newstyle
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: nix
nix: 2.2.1
script: nix-shell --run 'cabal new-test haskell-overridez-tests'
1 change: 1 addition & 0 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ in
pkgsMake pkgsMakeArgs ({ call, lib, ... }: rec {
haskell-overridez-exe = call.haskell.cabal2nix.app ./.;
haskell-overridez = call.package ./nix/wrapper;
haskell-overridez-tests = call.haskell.cabal2nix.lib ./haskell-overridez-tests;
})
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages:
./
./haskell-overridez-tests
1 change: 0 additions & 1 deletion fixtures/gobanme-no-yagai-purojekuto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/gobanme-no-yagai-purojekuto/DESC

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/gobanme-no-yagai-purojekuto/Main.hs

This file was deleted.

26 changes: 0 additions & 26 deletions fixtures/gobanme-no-yagai-purojekuto/default.nix

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions fixtures/gobanme-no-yagai-purojekuto/setup_test.sh

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/hachibanme-no-purojekuto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/hachibanme-no-purojekuto/DESC

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/hachibanme-no-purojekuto/Main.hs

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/hachibanme-no-purojekuto/hachibanme-no-purojekuto.cabal

This file was deleted.

31 changes: 0 additions & 31 deletions fixtures/hachibanme-no-purojekuto/setup_test.sh

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/ichibanme-no-yagai-purojekuto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/ichibanme-no-yagai-purojekuto/DESC

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/ichibanme-no-yagai-purojekuto/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/ichibanme-no-yagai-purojekuto/Main.hs

This file was deleted.

26 changes: 0 additions & 26 deletions fixtures/ichibanme-no-yagai-purojekuto/default.nix

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions fixtures/ichibanme-no-yagai-purojekuto/setup_test.sh

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/kyuubanme-no-purojekuto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/kyuubanme-no-purojekuto/DESC

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/kyuubanme-no-purojekuto/LICENSE

This file was deleted.

22 changes: 0 additions & 22 deletions fixtures/kyuubanme-no-purojekuto/Main.hs

This file was deleted.

13 changes: 0 additions & 13 deletions fixtures/kyuubanme-no-purojekuto/setup_test.sh

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/nanabanme-no-purojekuto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/nanabanme-no-purojekuto/DESC

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/nanabanme-no-purojekuto/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/nanabanme-no-purojekuto/Main.hs

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/nanabanme-no-purojekuto/nanabanme-no-purojekuto.cabal

This file was deleted.

16 changes: 0 additions & 16 deletions fixtures/nanabanme-no-purojekuto/setup_test.sh

This file was deleted.

12 changes: 0 additions & 12 deletions fixtures/nanabanme-no-purojekuto/test.sh

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/nibanme-no-yagai-purojekuto/DESC

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/nibanme-no-yagai-purojekuto/setup_test.sh

This file was deleted.

Loading