diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c2ad49a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +# adapted from https://github.com/purescript-contrib/purescript-argonaut-generic/blob/d211820cfec5c7cf2caa20dc6dc293671949b55c/.github/workflows/ci.yml +name: Purescript example + +on: + push: + branches: + - '**' + paths-ignore: [] + pull_request: + paths-ignore: [] + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Set up a PureScript toolchain + uses: purescript-contrib/setup-purescript@main + with: # https://github.com/purescript-contrib/setup-purescript#specify-versions + purescript: "0.14.0" + + - name: Cache PureScript dependencies + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} + path: | + .spago + output + + - name: Install dependencies + run: spago install + + - name: Build source + run: spago build --no-install + + - name: Run tests + run: spago test --no-install diff --git a/.gitignore b/.gitignore index da6c2f6..00e8ad9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ node_modules/ output/ .psc-package .psc-ide-port +.spago +.purs* diff --git a/README.md b/README.md index f318957..356a57d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # purescript-foreign-generic +[![Build Status](https://github.com/paf31/purescript-foreign-generic/actions/workflows/ci.yml/badge.svg)](https://github.com/paf31/purescript-foreign-generic/actions/workflows/ci.yml) + [![Build Status](https://travis-ci.org/paf31/purescript-foreign-generic.svg?branch=master)](https://travis-ci.org/paf31/purescript-foreign-generic) Generic deriving for `purescript-foreign`. diff --git a/packages.dhall b/packages.dhall new file mode 100644 index 0000000..d9d42e1 --- /dev/null +++ b/packages.dhall @@ -0,0 +1,4 @@ +let upstream = + https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210304/packages.dhall sha256:c88151fe7c05f05290224c9c1ae4a22905060424fb01071b691d3fe2e5bad4ca + +in upstream diff --git a/spago.dhall b/spago.dhall new file mode 100644 index 0000000..5c05b4b --- /dev/null +++ b/spago.dhall @@ -0,0 +1,16 @@ +{ name = "foreign-generic" +, dependencies = + [ "console" + , "effect" + , "psci-support" + , "prelude" + , "tuples" + , "bifunctors" + , "foreign" + , "foreign-object" + , "assert" + , "record" + ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] +}