Skip to content

Commit e5f068c

Browse files
committed
Use andreasabel/fix-whitespace-action
1 parent 41d0ace commit e5f068c

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ name: CI
33
# Trigger the workflow on push or pull request, but only for the master branch
44
on:
55
pull_request:
6+
paths:
7+
- 'lib/**'
8+
- 'src/**'
9+
- 'test/**'
10+
- 'lib/base/base.agda-lib'
11+
- 'agda2hs.cabal'
12+
- 'cabal.project'
13+
- 'Makefile'
14+
- '.github/workflows/**.yml'
15+
branches: [master]
616
push:
717
paths:
818
- 'lib/**'
@@ -52,12 +62,13 @@ jobs:
5262
cabal build --dry-run
5363
# cabal build --dry-run creates dist-newstyle/cache/plan.json
5464

55-
# Install fix-whitespace since we need it for tests.
56-
# This is done after the freeze to make sure we re-use the packages
57-
- name: Install fix-whitespace
58-
run: |
59-
echo "import: cabal.project" > cabal.project.ci
60-
cabal install fix-whitespace --project-file=cabal.project.ci
65+
# Andreas, 2025-11-28, AIM XLI, use fix-whitespace-action
66+
# # Install fix-whitespace since we need it for tests.
67+
# # This is done after the freeze to make sure we re-use the packages
68+
# - name: Install fix-whitespace
69+
# run: |
70+
# echo "import: cabal.project" > cabal.project.ci
71+
# cabal install fix-whitespace --project-file=cabal.project.ci
6172

6273
# Cache the contents of ~/.cabal/store to avoid rebuilding dependencies for
6374
# every build. `restore-keys` makes it use the latest cache even if the
@@ -73,8 +84,11 @@ jobs:
7384
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
7485
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
7586

87+
- name: Run fix-whitespace
88+
uses: andreasabel/fix-whitespace-action@v1
89+
7690
- name: Run test suite
77-
run: make test && git diff --exit-code
91+
run: make test-on-CI && git diff --exit-code
7892

7993
- name: Generate Prelude HTML
8094
if: ${{ (matrix.ghc == matrix.deploy-ghc) && (github.ref == 'refs/heads/master') }}

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
push:
77
branches: [master]
88

9+
# Runs on PRs targeting the default branch
10+
pull_request:
11+
branches: [master]
12+
913
# Allows you to run this workflow manually from the Actions tab
1014
workflow_dispatch:
1115

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY : install agda repl libHtml test testContainers testHtml golden docs
1+
.PHONY : install agda repl libHtml testContainers test test-on-CI testHtml golden clean docs
22
FILES = $(shell find src -type f)
33

44
build :
@@ -23,7 +23,9 @@ test/agda2hs : $(FILES)
2323
testContainers:
2424
cd ./lib/containers && ./generate-haskell.sh && cabal build containers-prop
2525

26-
test : checkWhitespace test/agda2hs testContainers
26+
test : checkWhitespace test-on-CI
27+
28+
test-on-CI : test/agda2hs testContainers
2729
make -C test
2830

2931
testHtml : test/agda2hs

0 commit comments

Comments
 (0)