Skip to content

Commit

Permalink
github action test
Browse files Browse the repository at this point in the history
  • Loading branch information
seanhess committed Dec 12, 2024
1 parent a3b5529 commit d6c6b50
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 92 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/docker-image.yml

This file was deleted.

59 changes: 24 additions & 35 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Haskell CI

on:
push:
branches:
- "*"
branches: [ "main", "ci" ]
pull_request:
branches: [ "main" ]

Expand All @@ -13,47 +12,37 @@ permissions:
jobs:
build:

strategy:
matrix:
os: [ ubuntu-22.04 ]
haskell: [ 9.4.7 ]
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
container:
image: haskell:9.8.2

steps:
- uses: actions/checkout@v3

- name: Check Haskell version
run: |
ghcup --version
ghc --version
- name: Install Haskell ${{ matrix.haskell }}
run: |
ghcup install ghc ${{ matrix.haskell }}
ghcup set ghc ${{ matrix.haskell }}
- name: Check Haskell version
run: ghc --version

- name: Cache
uses: actions/cache@v3
env:
# increment when you want to rebuild the cache
cache-name: cache-cabal-v6
with:
path: /home/runner/.local/state/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 }}-
- uses: actions/checkout@v4

# - uses: actions/setup-haskell@v1
# with:
# ghc-version: '9.6'
# cabal-version: '3.2'

# - 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 --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all
- name: Test
run: cabal test

0 comments on commit d6c6b50

Please sign in to comment.