Skip to content

Commit

Permalink
haskell-ci: patch workflow to skip PackageMap.hs in doctests
Browse files Browse the repository at this point in the history
We use haskell-ci's weird feature to apply a patch to the workflow file
in order to not test PackageMap.hs using doctest since it will always
fail -- there seems to be no way to install nix in haskell-ci's ubuntu
docker containers.

We can hopefully drop this if the following issue gets some kind of
resolution:
haskell-CI/haskell-ci#519
  • Loading branch information
sternenseemann committed Jun 5, 2021
1 parent 8331e78 commit cd91241
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci-skip-package-map.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml
index 5ed81c0..9bb7e56 100644
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -179,7 +179,7 @@ jobs:
- name: doctest
run: |
cd ${PKGDIR_distribution_nixpkgs} || false
- doctest -i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen src
+ doctest -i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen src/Distribution/Nixpkgs/Hashes.hs src/Distribution/Nixpkgs/License.hs src/Distribution/Nixpkgs/Meta.hs src/Language/Nix/PrettyPrinting.hs
- name: hlint
run: |
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_distribution_nixpkgs} && hlint src) ; fi
6 changes: 3 additions & 3 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci '--doctest' '--doctest-version=>0.18' '--doctest-options=-i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen' '--hlint' 'github' 'distribution-nixpkgs.cabal'
# haskell-ci '--github-patches' '.github/workflows/ci-skip-package-map.patch' '--doctest' '--doctest-version=>0.18' '--doctest-options=-i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen' '--hlint' 'github' 'distribution-nixpkgs.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
Expand All @@ -10,7 +10,7 @@
#
# version: 0.12.1
#
# REGENDATA ("0.12.1",["--doctest","--doctest-version=>0.18","--doctest-options=-i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen","--hlint","github","distribution-nixpkgs.cabal"])
# REGENDATA ("0.12.1",["--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-version=>0.18","--doctest-options=-i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen","--hlint","github","distribution-nixpkgs.cabal"])
#
name: Haskell-CI
on:
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
- name: doctest
run: |
cd ${PKGDIR_distribution_nixpkgs} || false
doctest -i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen src
doctest -i ../../dist-newstyle/build/*/*/distribution-nixpkgs-*/build/autogen src/Distribution/Nixpkgs/Hashes.hs src/Distribution/Nixpkgs/License.hs src/Distribution/Nixpkgs/Meta.hs src/Language/Nix/PrettyPrinting.hs
- name: hlint
run: |
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then (cd ${PKGDIR_distribution_nixpkgs} && hlint src) ; fi
Expand Down

0 comments on commit cd91241

Please sign in to comment.