Skip to content

Commit 8710c41

Browse files
Add -Werror checks
1 parent 4791447 commit 8710c41

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Nix Flake Check"
2+
3+
jobs:
4+
build-test:
5+
name: "Build & test"
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: 📥 Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: ❄ Prepare nix
13+
uses: cachix/install-nix-action@v26
14+
with:
15+
extra_nix_config: |
16+
accept-flake-config = true
17+
log-lines = 1000
18+
19+
- name: ❄ Cachix cache of nix derivations
20+
uses: cachix/cachix-action@v14
21+
with:
22+
name: cardano-scaling
23+
authToken: '${{ secrets.CACHIX_CARDANO_SCALING_AUTH_TOKEN }}'
24+
25+
- name: Nix Flake Check
26+
run: |
27+
nix flake check -L

flake.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
with pkgs.lib.attrsets;
9999
mapAttrs' (name: value: nameValuePair (s + name) value) attrs;
100100

101+
addWerror = x: x.override { ghcOptions = [ "-Werror" ]; };
102+
101103
in
102104
rec {
103105
legacyPackages = hsPkgs;
@@ -133,6 +135,15 @@
133135
src = self;
134136
exe = "${packages.plutus-merkle-tree-tests}/bin/tests";
135137
};
138+
hydra-cardano-api-werror = addWerror hsPkgs.hydra-cardano-api.components.library;
139+
hydra-cluster-werror = addWerror hsPkgs.hydra-cluster.components.library;
140+
hydra-chain-observer-werror = addWerror hsPkgs.hydra-chain-observer.components.exes.hydra-chain-observer;
141+
hydra-plutus-werror = addWerror hsPkgs.hydra-plutus.components.library;
142+
hydra-plutus-tests-werror = addWerror hsPkgs.hydra-plutus.components.exes.tests;
143+
hydra-node-werror = addWerror hsPkgs.hydra-node.components.library;
144+
hydra-node-tests-werror = addWerror hsPkgs.hydra-node.components.tests.tests;
145+
hydra-tui-werror = addWerror hsPkgs.hydra-tui.components.library;
146+
hydra-tui-tests-werror = addWerror hsPkgs.hydra-tui.components.tests.tests;
136147
} //
137148
(if pkgs.stdenv.isLinux then
138149
{

hydra-cluster/hydra-cluster.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ library
8585
build-depends:
8686
, aeson
8787
, async
88-
, base >=4.7 && <5
88+
, base >=4.7 && <5
8989
, bytestring
9090
, cardano-slotting
9191
, containers
@@ -103,7 +103,6 @@ library
103103
, lens
104104
, lens-aeson
105105
, optparse-applicative
106-
, plutus-ledger-api:plutus-ledger-api-testlib >=1.9.1.0
107106
, process
108107
, QuickCheck
109108
, req

hydra-node/test/Hydra/Model/Payment.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ instance IsTx Payment where
8686
type UTxOType Payment = [(CardanoSigningKey, Value)]
8787
type ValueType Payment = Value
8888
txId = error "undefined"
89+
txSpendingUTxO = error "undefined"
8990
balance = foldMap snd
9091
hashUTxO = encodeUtf8 . show @Text
9192

0 commit comments

Comments
 (0)