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

Run the tests with more prompt output on CircleCI #94

Merged
merged 8 commits into from
Sep 18, 2023
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
27 changes: 24 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
version: "2.1"

jobs:
cabal-test:
docker:
- image: "nixos/nix:2.13.2"

environment:
# Let us use features marked "experimental". For example, most/all of
# the `nix <subcommand>` forms. Also, allow import from derivation
# because cabal2nix requires it.
NIX_CONFIG: |
experimental-features = nix-command flakes
allow-import-from-derivation = true

steps:
- "checkout"
- run:
name: "Haskell Test Suite"
no_output_timeout: "30m"
command: |
nix run .#cabal-test

nix-build:
docker:
- image: "nixos/nix:2.13.2"
Expand All @@ -22,12 +42,13 @@ jobs:
nix flake check -v

- run:
name: "nix build"
name: "Nix Build"
no_output_timeout: "30m"
command: |
nix build -v
nix build --print-build-logs

workflows:
ci:
jobs:
- nix-build
- "cabal-test"
- "nix-build"
34 changes: 17 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,17 @@
checks = hslib.checks {};
devShells = hslib.devShells {};
packages = hslib.packages {};
apps = {
hlint = hslib.apps.hlint {argv = ["haskell/"];};
cabal-test = hslib.apps.cabal-test {
extraRuntimeInputs = pkgs: [
# Some build-time dependencies of old-time, a transitive
# dependency of ours...
pkgs.gnused
pkgs.gawk
];
testTargetName = "test:tests";
};
};
});
}
Loading