Skip to content

Commit

Permalink
GitHub Actions work from peterbecich
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbecich authored and thomasjm committed Jun 27, 2023
1 parent 116f01d commit f570828
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on: [push]
name: CI
jobs:
Cabal_build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
- "8.10.7"
- "9.0.2"
- "9.2.7"
- "9.4.4"

name: Cabal GHC ${{ matrix.ghc }}
steps:
- uses: actions/checkout@v3
- name: Setup Haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.8.1.0'
- run: cabal build all --enable-tests
- run: cabal test all

Stack_build:
name: Stack GHC ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
- "8.10.7"
- "9.0.2"
- "9.2.7"
- "9.4.4"
steps:
- uses: actions/checkout@v3

- uses: haskell/actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: "latest"

- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack

- name: Build
run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks

- name: Test
run: stack test --system-ghc
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubernetes Haskell Client

[![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)
[![Build Status](https://travis-ci.org/kubernetes-client/haskell.svg?branch=master)](https://travis-ci.org/kubernetes-client/haskell)

Haskell client for the [kubernetes](http://kubernetes.io/) API.
Expand Down
4 changes: 4 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packages:
kubernetes
kubernetes-client
examples
1 change: 0 additions & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist
dist-newstyle
*.cabal
.stack-work
54 changes: 54 additions & 0 deletions examples/kubernetes-examples.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack

name: kubernetes-examples
version: 0.1.0.1
synopsis: Kubernetes examples with Haskell
description: Examples to interact with Kubernetes using kubernetes-client and kubernetes-client-core
category: Examples, Kubernetes
maintainer: Shimin Guo <[email protected]>,
Akshay Mankar <[email protected]>
license: Apache-2.0
license-file: LICENSE
build-type: Simple

executable in-cluster
main-is: Main.hs
other-modules:
Paths_kubernetes_examples
hs-source-dirs:
in-cluster
ghc-options: -Wall
build-depends:
base <5
, containers
, http-client
, http-types
, kubernetes-client
, kubernetes-client-core
, safe-exceptions
, stm
, text
default-language: Haskell2010

executable simple
main-is: Main.hs
other-modules:
Paths_kubernetes_examples
hs-source-dirs:
simple
ghc-options: -Wall
build-depends:
base <5
, containers
, http-client
, http-types
, kubernetes-client
, kubernetes-client-core
, safe-exceptions
, stm
, text
default-language: Haskell2010
2 changes: 1 addition & 1 deletion examples/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ executables:
ghc-options:
- -Wall
dependencies:
- base
- base < 5
- containers
- http-client
- http-types
Expand Down
6 changes: 6 additions & 0 deletions kubernetes-client/kubernetes-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ library
hs-source-dirs:
src
ghc-options: -Wall
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
aeson >=1.2 && <3
, attoparsec >=0.13
Expand Down Expand Up @@ -88,6 +90,8 @@ test-suite example
Paths_kubernetes_client
hs-source-dirs:
example
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
aeson >=1.2 && <3
, attoparsec >=0.13
Expand Down Expand Up @@ -138,6 +142,8 @@ test-suite spec
Paths_kubernetes_client
hs-source-dirs:
test
build-tool-depends:
hspec-discover:hspec-discover
build-depends:
aeson >=1.2 && <3
, attoparsec >=0.13
Expand Down
2 changes: 2 additions & 0 deletions kubernetes-client/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ library:
source-dirs: src
ghc-options:
- -Wall
build-tools:
- hspec-discover
tests:
spec:
main: Spec.hs
Expand Down

0 comments on commit f570828

Please sign in to comment.