Skip to content

Commit

Permalink
add tests, workflow for haskell samples (#16290)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Aug 10, 2023
1 parent 9f051ec commit 36cb3ce
Show file tree
Hide file tree
Showing 7 changed files with 864 additions and 20 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/samples-haskell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Samples Haskell

on:
push:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/client/petstore/haskell-http-client/**
pull_request:
paths:
- samples/server/petstore/haskell-yesod/**
- samples/server/petstore/haskell-servant/**
- samples/client/petstore/haskell-http-client/**
jobs:
build:
name: Build stack projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/haskell-yesod/
- samples/server/petstore/haskell-servant/
- samples/client/petstore/haskell-http-client/
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
# ghc-version: '8.8.4' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- name: stack test
working-directory: ${{ matrix.sample }}
run: stack test
2 changes: 1 addition & 1 deletion bin/configs/haskell-servant.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generatorName: haskell
outputDir: samples/server/petstore/haskell-servant
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/haskell/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/haskell-servant
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: haskell-yesod
outputDir: samples/server/petstore/haskell-yesod
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/haskell/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/haskell-yesod
additionalProperties:
hideGenerationTimestamp: "true"
Loading

0 comments on commit 36cb3ce

Please sign in to comment.