diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..ee815a8 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,48 @@ +name: CI (Stack) + +on: [push, pull_request] + +jobs: + test_with_stack: + name: Testing with Stack-${{ matrix.stack }}, on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + stack: ["2.9.3"] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1.1.3 + with: + ghc-version: ${{ matrix.ghc }} + stack-version: ${{ matrix.stack }} + - name: Cache (Unix platform) + uses: actions/cache@v2 + with: + path: ~/.stack + key: stack-cache-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}-${{ hashFiles('stack.yaml') }} + restore-keys: | + stack-cache-${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }} + stack-cache-${{ runner.os }} + - name: Install dependencies + run: | + stack update + stack build --system-ghc --only-dependencies --test --bench --no-run-tests --no-run-benchmarks + - name: Build + run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks + - name: Run tests + run: stack test + hlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: "Set up HLint" + uses: haskell/actions/hlint-setup@v2 + + - name: "Run HLint" + uses: haskell/actions/hlint-run@v2 + with: + path: . + fail-on: warning