mirror of
https://github.com/sayo-hs/heftia.git
synced 2024-11-30 00:36:55 +03:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Haskell CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [synchronize, opened, reopened]
|
|
schedule:
|
|
- cron: "0 0 * * 0"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
ghc: ["9.4.1", "9.6.6", "9.8.2"]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: haskell-actions/setup@v2.7.6
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: "3.10"
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v3
|
|
env:
|
|
cache-name: cache-cabal
|
|
with:
|
|
path: ~/.cabal
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cabal update
|
|
cabal build --only-dependencies --enable-tests all
|
|
- name: Build
|
|
run: cabal build --enable-tests all
|
|
- name: Run tests
|
|
run: cabal test all
|