Migrate to GitHub Actions

This commit is contained in:
patrick brisbin 2021-02-26 16:52:37 -05:00
parent cfcd8c5210
commit 766cb40d41
2 changed files with 35 additions and 39 deletions

View File

@ -1,39 +0,0 @@
version: 2.1
orbs:
stack-build: pbrisbin/stack-build@2.0.0
defaults: &defaults
hlint-yaml-url:
https://raw.githubusercontent.com/pbrisbin/dotfiles/master/hlint.yaml
stack-arguments: --flag yesod-auth-oauth2:example
weeder: false
workflows:
commit:
jobs:
- stack-build/build-test-lint:
<<: *defaults
name: "default"
- stack-build/build-test-lint:
<<: *defaults
name: "ghc-8.6.3 / lts-13.2"
stack-yaml: stack-lts-13.2.yaml
- stack-build/build-test-lint:
<<: *defaults
name: "ghc-8.8.3 / lts-16.10"
stack-yaml: stack-lts-16.10.yaml
- stack-build/build-test-nightly:
name: "nightly"
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- stack-build/build-test-nightly:
name: "nightly"

35
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,35 @@
on:
pull_request:
push:
branches: main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
stack-yaml:
- stack.yaml
- stack-lts-16.10.yaml
- stack-lts-13.2.yaml
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.stack
./.stack-work
key: ${{ runner.os }}-${{ hashFiles(matrix.stack-yaml) }}-${{ hashFiles('*.cabal') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles(matrix.stack-yaml) }}-
${{ runner.os }}-
- run:
curl --output .hlint.yaml https://raw.githubusercontent.com/pbrisbin/dotfiles/master/hlint.yaml
- uses: freckle/stack-action@main
with:
stack-yaml: ${{ matrix.stack-yaml }}
stack-arguments: --flag yesod-auth-oauth2:example
weeder: false