Skip to content

Commit

Permalink
Add -Werror checks
Browse files Browse the repository at this point in the history
  • Loading branch information
locallycompact committed May 13, 2024
1 parent 4791447 commit 0eebc98
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/nix-flake-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Nix Flake Check"

jobs:
build-test:
name: "Build & test"
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: ❄ Prepare nix
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: ❄ Cachix cache of nix derivations
uses: cachix/cachix-action@v14
with:
name: cardano-scaling
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'

- name: Nix Flake Check
run: |
nix flake check -L
11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
with pkgs.lib.attrsets;
mapAttrs' (name: value: nameValuePair (s + name) value) attrs;

addWerror = x: x.override { ghcOptions = [ "-Werror" ]; };

in
rec {
legacyPackages = hsPkgs;
Expand Down Expand Up @@ -133,6 +135,15 @@
src = self;
exe = "${packages.plutus-merkle-tree-tests}/bin/tests";
};
hydra-cardano-api-werror = addWerror hsPkgs.hydra-cardano-api.components.library;
hydra-cluster-werror = addWerror hsPkgs.hydra-cluster.components.library;
hydra-chain-observer-werror = addWerror hsPkgs.hydra-chain-observer.components.exes.hydra-chain-observer;
hydra-plutus-werror = addWerror hsPkgs.hydra-plutus.components.library;
hydra-plutus-tests-werror = addWerror hsPkgs.hydra-plutus.components.exes.tests;
hydra-node-werror = addWerror hsPkgs.hydra-node.components.library;
hydra-node-tests-werror = addWerror hsPkgs.hydra-node.components.tests.tests;
hydra-tui-werror = addWerror hsPkgs.hydra-tui.components.library;
hydra-tui-tests-werror = addWerror hsPkgs.hydra-tui.components.tests.tests;
} //
(if pkgs.stdenv.isLinux then
{
Expand Down
3 changes: 1 addition & 2 deletions hydra-cluster/hydra-cluster.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ library
build-depends:
, aeson
, async
, base >=4.7 && <5
, base >=4.7 && <5
, bytestring
, cardano-slotting
, containers
Expand All @@ -103,7 +103,6 @@ library
, lens
, lens-aeson
, optparse-applicative
, plutus-ledger-api:plutus-ledger-api-testlib >=1.9.1.0
, process
, QuickCheck
, req
Expand Down
1 change: 1 addition & 0 deletions hydra-node/test/Hydra/Model/Payment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ instance IsTx Payment where
type UTxOType Payment = [(CardanoSigningKey, Value)]
type ValueType Payment = Value
txId = error "undefined"
txSpendingUTxO = error "undefined"
balance = foldMap snd
hashUTxO = encodeUtf8 . show @Text

Expand Down

0 comments on commit 0eebc98

Please sign in to comment.