diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0123a28 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..10ef0c3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,49 @@ +name: CI +on: + push: + branches: + - master + pull_request: + types: + - opened + - synchronize +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest] + cabal: ["3.4"] + ghc: ["8.10.7"] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - uses: haskell/actions/setup@v2 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + - name: Cabal Update + run: | + cabal v2-update + cabal v2-freeze $CONFIG + - uses: actions/cache@v3.0.3 + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- + - name: Build all + run: | + cabal build all + cabal sdist all + - name: Run tests + run: | + cabal test all + - name: Build haddock + run: | + cabal haddock all