Skip to content

Commit f570828

Browse files
peterbecichthomasjm
authored andcommitted
GitHub Actions work from peterbecich
1 parent 116f01d commit f570828

File tree

8 files changed

+125
-2
lines changed

8 files changed

+125
-2
lines changed

.github/workflows/ci.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
on: [push]
2+
name: CI
3+
jobs:
4+
Cabal_build:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
ghc:
10+
- "8.10.7"
11+
- "9.0.2"
12+
- "9.2.7"
13+
- "9.4.4"
14+
15+
name: Cabal GHC ${{ matrix.ghc }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Setup Haskell
19+
uses: haskell/actions/setup@v2
20+
with:
21+
ghc-version: ${{ matrix.ghc }}
22+
cabal-version: '3.8.1.0'
23+
- run: cabal build all --enable-tests
24+
- run: cabal test all
25+
26+
Stack_build:
27+
name: Stack GHC ${{ matrix.ghc }}
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
ghc:
33+
- "8.10.7"
34+
- "9.0.2"
35+
- "9.2.7"
36+
- "9.4.4"
37+
steps:
38+
- uses: actions/checkout@v3
39+
40+
- uses: haskell/actions/setup@v2
41+
name: Setup Haskell Stack
42+
with:
43+
ghc-version: ${{ matrix.ghc }}
44+
enable-stack: true
45+
stack-version: "latest"
46+
47+
- uses: actions/cache@v3
48+
name: Cache ~/.stack
49+
with:
50+
path: ~/.stack
51+
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
52+
53+
- name: Build
54+
run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
55+
56+
- name: Test
57+
run: stack test --system-ghc

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Kubernetes Haskell Client
22

3+
[![Stack and Cabal](https://github.com/kubernetes-client/haskell/actions/workflows/ci.yml/badge.svg)](https://github.com/kubernetes-client/haskell/actions/workflows/ci.yml)
34
[![Build Status](https://travis-ci.org/kubernetes-client/haskell.svg?branch=master)](https://travis-ci.org/kubernetes-client/haskell)
45

56
Haskell client for the [kubernetes](http://kubernetes.io/) API.

cabal.project

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages:
2+
kubernetes
3+
kubernetes-client
4+
examples

examples/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
dist
22
dist-newstyle
3-
*.cabal
43
.stack-work

examples/kubernetes-examples.cabal

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
cabal-version: 1.12
2+
3+
-- This file has been generated from package.yaml by hpack version 0.34.4.
4+
--
5+
-- see: https://github.com/sol/hpack
6+
7+
name: kubernetes-examples
8+
version: 0.1.0.1
9+
synopsis: Kubernetes examples with Haskell
10+
description: Examples to interact with Kubernetes using kubernetes-client and kubernetes-client-core
11+
category: Examples, Kubernetes
12+
maintainer: Shimin Guo <[email protected]>,
13+
Akshay Mankar <[email protected]>
14+
license: Apache-2.0
15+
license-file: LICENSE
16+
build-type: Simple
17+
18+
executable in-cluster
19+
main-is: Main.hs
20+
other-modules:
21+
Paths_kubernetes_examples
22+
hs-source-dirs:
23+
in-cluster
24+
ghc-options: -Wall
25+
build-depends:
26+
base <5
27+
, containers
28+
, http-client
29+
, http-types
30+
, kubernetes-client
31+
, kubernetes-client-core
32+
, safe-exceptions
33+
, stm
34+
, text
35+
default-language: Haskell2010
36+
37+
executable simple
38+
main-is: Main.hs
39+
other-modules:
40+
Paths_kubernetes_examples
41+
hs-source-dirs:
42+
simple
43+
ghc-options: -Wall
44+
build-depends:
45+
base <5
46+
, containers
47+
, http-client
48+
, http-types
49+
, kubernetes-client
50+
, kubernetes-client-core
51+
, safe-exceptions
52+
, stm
53+
, text
54+
default-language: Haskell2010

examples/package.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ executables:
2222
ghc-options:
2323
- -Wall
2424
dependencies:
25-
- base
25+
- base < 5
2626
- containers
2727
- http-client
2828
- http-types

kubernetes-client/kubernetes-client.cabal

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ library
4444
hs-source-dirs:
4545
src
4646
ghc-options: -Wall
47+
build-tool-depends:
48+
hspec-discover:hspec-discover
4749
build-depends:
4850
aeson >=1.2 && <3
4951
, attoparsec >=0.13
@@ -88,6 +90,8 @@ test-suite example
8890
Paths_kubernetes_client
8991
hs-source-dirs:
9092
example
93+
build-tool-depends:
94+
hspec-discover:hspec-discover
9195
build-depends:
9296
aeson >=1.2 && <3
9397
, attoparsec >=0.13
@@ -138,6 +142,8 @@ test-suite spec
138142
Paths_kubernetes_client
139143
hs-source-dirs:
140144
test
145+
build-tool-depends:
146+
hspec-discover:hspec-discover
141147
build-depends:
142148
aeson >=1.2 && <3
143149
, attoparsec >=0.13

kubernetes-client/package.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ library:
1515
source-dirs: src
1616
ghc-options:
1717
- -Wall
18+
build-tools:
19+
- hspec-discover
1820
tests:
1921
spec:
2022
main: Spec.hs

0 commit comments

Comments
 (0)