Skip to content

Commit 36cb3ce

Browse files
authored
add tests, workflow for haskell samples (#16290)
1 parent 9f051ec commit 36cb3ce

7 files changed

Lines changed: 864 additions & 20 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Samples Haskell
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/server/petstore/haskell-yesod/**
7+
- samples/server/petstore/haskell-servant/**
8+
- samples/client/petstore/haskell-http-client/**
9+
pull_request:
10+
paths:
11+
- samples/server/petstore/haskell-yesod/**
12+
- samples/server/petstore/haskell-servant/**
13+
- samples/client/petstore/haskell-http-client/**
14+
jobs:
15+
build:
16+
name: Build stack projects
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
sample:
22+
# servers
23+
- samples/server/petstore/haskell-yesod/
24+
- samples/server/petstore/haskell-servant/
25+
- samples/client/petstore/haskell-http-client/
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: haskell/actions/setup@v2
29+
with:
30+
# ghc-version: '8.8.4' # Exact version of ghc to use
31+
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
32+
enable-stack: true
33+
stack-version: 'latest'
34+
- name: stack test
35+
working-directory: ${{ matrix.sample }}
36+
run: stack test

bin/configs/haskell-servant.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
generatorName: haskell
22
outputDir: samples/server/petstore/haskell-servant
3-
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/haskell/petstore.yaml
44
templateDir: modules/openapi-generator/src/main/resources/haskell-servant
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: haskell-yesod
22
outputDir: samples/server/petstore/haskell-yesod
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/haskell/petstore.yaml
44
templateDir: modules/openapi-generator/src/main/resources/haskell-yesod
55
additionalProperties:
66
hideGenerationTimestamp: "true"

0 commit comments

Comments
 (0)