-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from himura/github-actions
Set up GitHub Actions
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Haskell CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ghc: [ '8.4.4', '8.6.5', '8.8.3' ] | ||
cabal: [ '3.0' ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-haskell@v1 | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- name: Cache ~/.cabal/packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cabal/packages | ||
key: ${{ runner.os }}-cabal-packages-cabal${{ matrix.cabal }}-ghc${{ matrix.ghc }} | ||
restore-keys: | | ||
${{ runner.os }}-cabal-packages-cabal${{ matrix.cabal }}- | ||
- name: Cache ~/.cabal/store | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cabal/store | ||
key: ${{ runner.os }}-cabal-store-cabal${{ matrix.cabal }}-ghc${{ matrix.ghc }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
cabal v2-update | ||
cabal v2-build all --only-dependencies | ||
- name: Build | ||
run: cabal v2-build all | ||
- name: Run tests | ||
run: cabal v2-test all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
packages: ./ | ||
sample/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters