-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (58 loc) · 1.54 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
on:
push:
branches:
- main
pull_request: {}
workflow_dispatch : {}
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ghc:
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.2"
- "9.10.1"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Install GHCup on MacOS
if: matrix.os == 'macos-latest'
run: |
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_MINIMAL=1 sh
- name: Upgrade GHCup on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
ghcup upgrade
- name: Install Tools
env:
GHCUP_CURL_OPTS: "--suppress-connect-headers"
run: |
ghcup list
ghcup rm ghc ${{ matrix.ghc }} || true
ghcup install ghc ${{ matrix.ghc }} --set
ghcup install cabal 3.12.1.0 --set
cabal update
- name: Build
run: |
cabal build all --enable-tests
- name: Run Tests
run: cabal test --test-show-details=always all
post_job:
runs-on: ubuntu-latest
needs: [test]
steps:
- run: |
echo "jobs info: ${{ toJSON(needs) }}"
- if: contains(needs.*.result, 'failure')
run: exit 1
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
run: exit 1