diff --git a/.github/workflows/haskell-test.yaml b/.github/workflows/haskell-test.yaml new file mode 100644 index 0000000..97cd962 --- /dev/null +++ b/.github/workflows/haskell-test.yaml @@ -0,0 +1,65 @@ +--- +name: Haskell Test + +on: + pull_request: + paths: + - bitcoin-scripting.cabal + - "src/**.hs" + - "test/**.hs" + - .github/workflows/haskell-test.yaml + types: + - synchronize + - opened + - reopened + - ready_for_review + push: + branches: + - master + paths: + - bitcoin-scripting.cabal + - "src/**.hs" + - "test/**.hs" + - .github/workflows/haskell-test.yaml + workflow_dispatch: + inputs: {} + +jobs: + haskell-test: + if: github.event.pull_request.draft == false || github.ref == 'refs/heads/master' + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-haskell-test + cancel-in-progress: true + + permissions: + contents: read + packages: read + issues: read + checks: write + + runs-on: + labels: ubuntu-22.04-16cores + container: + image: haskell:9.6.5 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: apt + run: | + apt update + apt install libsecp256k1-dev + + - name: cabal build + run: | + cabal update + cabal build + + - name: cabal test + run: | + cabal test diff --git a/.gitignore b/.gitignore index 7d1f2a0..218fa4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /dist-newstyle/ /cabal.project.local +/.stack-work /TAGS diff --git a/bitcoin-scripting.cabal b/bitcoin-scripting.cabal index 8e756ca..499a17b 100644 --- a/bitcoin-scripting.cabal +++ b/bitcoin-scripting.cabal @@ -12,7 +12,7 @@ category: Language build-type: Simple extra-source-files: CHANGELOG.md -tested-with: GHC == 8.10.4 +tested-with: GHC ==9.6.5 common base default-language: Haskell2010