|
22 | 22 | - name: 📥 Checkout repository |
23 | 23 | uses: actions/checkout@v4 |
24 | 24 |
|
| 25 | + - name: 🏗 Install yq |
| 26 | + uses: frenck/action-setup-yq@v1 |
| 27 | + |
25 | 28 | - name: 🔍 Determine stack resolver & GHC |
26 | 29 | run: | |
| 30 | + STACK_ROOT="$(stack path --stack-root)" |
27 | 31 | STACK_RESOLVER=$(yq .resolver stack.yaml) |
28 | 32 | GHC_VERSION=$(echo $(yq .compiler stack.yaml) | cut -c 5-) |
29 | 33 | echo STACK_RESOLVER="${STACK_RESOLVER}" >> "${GITHUB_ENV}" |
|
36 | 40 | id: stack-global |
37 | 41 | uses: actions/cache/restore@v4 |
38 | 42 | with: |
39 | | - path: ~/.stack |
| 43 | + path: ${{ env.STACK_ROOT }} |
40 | 44 | key: ${{ runner.os }}-stack-resolver-${{ env.STACK_RESOLVER }}-global-${{ hashFiles('**.yaml') }} |
41 | 45 | restore-keys: | |
42 | 46 | ${{ runner.os }}-stack-resolver-${{ env.STACK_RESOLVER }}-global |
@@ -64,26 +68,24 @@ jobs: |
64 | 68 | enable-stack: true |
65 | 69 | stack-version: 'latest' |
66 | 70 |
|
67 | | - - name: ⏬ Install dependencies |
68 | | - run: | |
69 | | - stack build |
| 71 | + - name: 🔨 Build |
| 72 | + run: stack build |
70 | 73 |
|
71 | | - - name: 🔨 Build and run tests |
72 | | - run: | |
73 | | - stack test |
| 74 | + - name: 🧪 Run tests |
| 75 | + run: stack test |
74 | 76 |
|
75 | 77 | # things to be cached |
76 | 78 |
|
77 | 79 | - name: 💾 Cache stack global package db |
78 | 80 | if: always() && steps.stack-global.outputs.cache-hit != 'true' |
79 | | - uses: actions/cache/save@v3 |
| 81 | + uses: actions/cache/save@v4 |
80 | 82 | with: |
81 | | - path: ~/.stack |
| 83 | + path: ${{ env.STACK_ROOT }} |
82 | 84 | key: ${{ steps.stack-global.outputs.cache-primary-key }} |
83 | 85 |
|
84 | 86 | - name: 💾 Cache .stack-work |
85 | 87 | if: always() && steps.stack-work.outputs.cache-hit != 'true' |
86 | | - uses: actions/cache/save@v3 |
| 88 | + uses: actions/cache/save@v4 |
87 | 89 | with: |
88 | 90 | path: .stack-work |
89 | 91 | key: ${{ steps.stack-work.outputs.cache-primary-key }} |
@@ -215,7 +217,7 @@ jobs: |
215 | 217 |
|
216 | 218 | - name: 🔨 Build and run tests |
217 | 219 | run: | |
218 | | - |
| 220 | +
|
219 | 221 | stack test --ta --als-path=zip/als |
220 | 222 |
|
221 | 223 | # release (optional) |
|
0 commit comments