Skip to content

Commit d3aa01c

Browse files
committed
Add CI for building and running tests
1 parent 99c6044 commit d3aa01c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/project.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Lambda Parser CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-haskell@v1
20+
with:
21+
ghc-version: '9.4.7'
22+
cabal-version: '2.4'
23+
24+
- name: Cache
25+
uses: actions/cache@v3
26+
env:
27+
cache-name: cache-cabal
28+
with:
29+
path: ~/.cabal
30+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
31+
restore-keys: |
32+
${{ runner.os }}-build-${{ env.cache-name }}-
33+
${{ runner.os }}-build-
34+
${{ runner.os }}-
35+
36+
- name: Install dependencies
37+
run: |
38+
cabal update
39+
cabal build --only-dependencies --enable-tests --enable-benchmarks
40+
- name: Build
41+
run: cabal build --enable-tests --enable-benchmarks all
42+
- name: Run tests
43+
run: cabal test all

0 commit comments

Comments
 (0)