-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Clément Hurlin <smelc@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
477 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Check cabal-gild format | ||
|
||
on: | ||
merge_group: | ||
pull_request: | ||
|
||
jobs: | ||
check-cabal-gild: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CARDANO_GUILD_VERSION: "1.3.1.2" | ||
|
||
steps: | ||
- name: Download cardano-gild | ||
run: | | ||
cardano_gild_path="$(mktemp -d)" | ||
version="${{env.CARDANO_GUILD_VERSION}}" | ||
curl -sL \ | ||
"https://github.com/tfausak/cabal-gild/releases/download/$version/cabal-gild-$version-linux-x64.tar.gz" \ | ||
| tar -C "$cardano_gild_path" -xz | ||
echo "PATH=$cardano_gild_path:$PATH" >> "$GITHUB_ENV" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run cardano-gild over all modified files | ||
run: | | ||
rc="0" | ||
for file in $(git ls-files "*.cabal") | ||
do | ||
echo "cabal-gild --mode=check --input=$file" | ||
if ! cabal-gild --mode=check --input="$file" | ||
then | ||
echo "💣 $file is badly formatted. Fix it with:" | ||
echo "cabal-gild --mode=format --io=$file" | ||
rc="1" | ||
fi | ||
done | ||
exit $rc | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
cabal-version: 3.0 | ||
name: cardano-api-gen | ||
version: 8.2.1.0 | ||
synopsis: Generators for the cardano api | ||
description: Generators for the cardano api. | ||
category: | ||
Cardano, | ||
API, | ||
Test, | ||
|
||
name: cardano-api-gen | ||
version: 8.2.1.0 | ||
synopsis: Generators for the cardano api | ||
description: Generators for the cardano api. | ||
category: Cardano, | ||
API, | ||
Test, | ||
copyright: 2020-2023 Input Output Global Inc (IOG). | ||
author: IOHK | ||
maintainer: operations@iohk.io | ||
license: Apache-2.0 | ||
license-files: LICENSE | ||
NOTICE | ||
build-type: Simple | ||
extra-source-files: README.md, CHANGELOG.md | ||
copyright: 2020-2023 Input Output Global Inc (IOG). | ||
author: IOHK | ||
maintainer: operations@iohk.io | ||
license: Apache-2.0 | ||
license-files: | ||
LICENSE | ||
NOTICE | ||
|
||
common project-config | ||
default-language: Haskell2010 | ||
default-extensions: OverloadedStrings | ||
build-depends: base >= 4.14 && < 4.20 | ||
build-type: Simple | ||
extra-source-files: | ||
CHANGELOG.md | ||
README.md | ||
|
||
ghc-options: -Wall | ||
-Wcompat | ||
-Wincomplete-record-updates | ||
-Wincomplete-uni-patterns | ||
-Wpartial-fields | ||
-Wredundant-constraints | ||
-Wunused-packages | ||
common project-config | ||
default-language: Haskell2010 | ||
default-extensions: OverloadedStrings | ||
build-depends: base >=4.14 && <4.20 | ||
ghc-options: | ||
-Wall | ||
-Wcompat | ||
-Wincomplete-record-updates | ||
-Wincomplete-uni-patterns | ||
-Wpartial-fields | ||
-Wredundant-constraints | ||
-Wunused-packages | ||
|
||
library | ||
import: project-config | ||
|
||
build-depends: cardano-api:gen | ||
|
||
hs-source-dirs: src | ||
import: project-config | ||
build-depends: cardano-api:gen | ||
hs-source-dirs: src | ||
-- These modules should match those in cardano-api:gen | ||
exposed-modules: Test.Gen.Cardano.Api.Empty | ||
reexported-modules: Test.Gen.Cardano.Api | ||
, Test.Gen.Cardano.Api.Metadata | ||
, Test.Gen.Cardano.Api.ProtocolParameters | ||
, Test.Gen.Cardano.Api.Typed | ||
, Test.Gen.Cardano.Crypto.Seed | ||
, Test.Hedgehog.Golden.ErrorMessage | ||
, Test.Hedgehog.Roundtrip.Bech32 | ||
, Test.Hedgehog.Roundtrip.CBOR | ||
exposed-modules: Test.Gen.Cardano.Api.Empty | ||
reexported-modules: | ||
Test.Gen.Cardano.Api, | ||
Test.Gen.Cardano.Api.Metadata, | ||
Test.Gen.Cardano.Api.ProtocolParameters, | ||
Test.Gen.Cardano.Api.Typed, | ||
Test.Gen.Cardano.Crypto.Seed, | ||
Test.Hedgehog.Golden.ErrorMessage, | ||
Test.Hedgehog.Roundtrip.Bech32, | ||
Test.Hedgehog.Roundtrip.CBOR, |
Oops, something went wrong.