Skip to content

Commit 54eeb5e

Browse files
committed
GHA: moved stylish-haskell to checks
1 parent 07d1016 commit 54eeb5e

File tree

2 files changed

+48
-50
lines changed

2 files changed

+48
-50
lines changed

.github/workflows/checks.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,51 @@ jobs:
2727
- name: Check changelogs
2828
run: ./scripts/check-changelogs.sh
2929

30+
stylish-haskell:
31+
runs-on: ubuntu-22.04
32+
33+
env:
34+
STYLISH_HASKELL_VERSION: "0.14.4.0"
35+
36+
steps:
37+
- name: Set cache version
38+
run: |
39+
echo "CACHE_VERSION=hi5eTh3A" >> $GITHUB_ENV
40+
41+
- name: "Install build environment (apt-get)"
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get -y install fd-find
45+
46+
- name: "Setup Haskell"
47+
uses: haskell-actions/setup@v2
48+
id: setup-haskell
49+
with:
50+
ghc-version: 9.6.3
51+
cabal-version: 3.10.1.0
52+
53+
- name: "Setup cabal bin path"
54+
run: |
55+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
56+
57+
- name: Download stylish-haskell
58+
run: |
59+
version="${{ env.STYLISH_HASKELL_VERSION }}"
60+
61+
curl -sL \
62+
"https://github.com/haskell/stylish-haskell/releases/download/v$version/stylish-haskell-v$version-linux-x86_64.tar.gz" \
63+
| tar -C "/tmp" -xz
64+
65+
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> $GITHUB_ENV
66+
67+
- name: "`stylish-haskell` version"
68+
run: |
69+
which stylish-haskell
70+
stylish-haskell --version
71+
72+
- uses: actions/checkout@v3
73+
74+
- name: "Run `stylish-haskell`"
75+
run: |
76+
./scripts/check-stylish.sh
77+
git diff --exit-code

.github/workflows/haskell.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -82,53 +82,3 @@ jobs:
8282

8383
- name: strict-mvar [test]
8484
run: cabal run strict-mvar:test
85-
86-
87-
stylish-haskell:
88-
runs-on: ubuntu-22.04
89-
90-
env:
91-
STYLISH_HASKELL_VERSION: "0.14.4.0"
92-
93-
steps:
94-
- name: Set cache version
95-
run: |
96-
echo "CACHE_VERSION=hi5eTh3A" >> $GITHUB_ENV
97-
98-
- name: "Install build environment (apt-get)"
99-
run: |
100-
sudo apt-get update
101-
sudo apt-get -y install fd-find
102-
103-
- name: "Setup Haskell"
104-
uses: haskell-actions/setup@v2
105-
id: setup-haskell
106-
with:
107-
ghc-version: 9.6.3
108-
cabal-version: 3.10.1.0
109-
110-
- name: "Setup cabal bin path"
111-
run: |
112-
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
113-
114-
- name: Download stylish-haskell
115-
run: |
116-
version="${{ env.STYLISH_HASKELL_VERSION }}"
117-
118-
curl -sL \
119-
"https://github.com/haskell/stylish-haskell/releases/download/v$version/stylish-haskell-v$version-linux-x86_64.tar.gz" \
120-
| tar -C "/tmp" -xz
121-
122-
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> $GITHUB_ENV
123-
124-
- name: "`stylish-haskell` version"
125-
run: |
126-
which stylish-haskell
127-
stylish-haskell --version
128-
129-
- uses: actions/checkout@v3
130-
131-
- name: "Run `stylish-haskell`"
132-
run: |
133-
./scripts/check-stylish.sh
134-
git diff --exit-code

0 commit comments

Comments
 (0)