Skip to content

Commit

Permalink
Merge pull request doriordan#153 from hagay3/feature/hagai/minikubeciv20
Browse files Browse the repository at this point in the history
minikube ci v20
  • Loading branch information
hagay3 authored May 29, 2022
2 parents 45da9f1 + d106021 commit 95ae7fd
Show file tree
Hide file tree
Showing 13 changed files with 583 additions and 432 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
name: Continuous Integration

on:
pull_request:
branches: ['**']


push:
branches: ['**']
tags: [v*]
Expand Down Expand Up @@ -49,6 +49,9 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}




- run: sbt ++${{ matrix.scala }} test It/compile

- name: Compress target directories
Expand Down Expand Up @@ -136,6 +139,26 @@ jobs:
with:
minikube version: v1.23.2
kubernetes version: v1.19.6
githubtoken: ${{ secrets.GITHUB_TOKEN }}
github token: ${{ secrets.GITHUB_TOKEN }}

- run: sbt ++${{ matrix.scala }} It/test

integration-kubernetes-v1-20:
name: integration-kubernetes-v1-20
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.4]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
uses: actions/checkout@v2

- uses: manusa/actions-setup-minikube@v2.5.0
with:
minikube version: v1.23.2
kubernetes version: v1.20.11
github token: ${{ secrets.GITHUB_TOKEN }}

- run: sbt ++${{ matrix.scala }} It/test
37 changes: 24 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,38 @@ lazy val commonSettings = Seq(
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
sonatypeCredentialHost := Sonatype.sonatype01
)
// run sbt githubWorkflowGenerate in order to generate github actions files
inThisBuild(List(
githubWorkflowScalaVersions := supportedScalaVersion,
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "It/compile"))),
githubWorkflowAddedJobs := Seq(WorkflowJob(
id = "integration-kubernetes-v1-19",
name = "integration-kubernetes-v1-19",

/** run the following command in order to generate github actions files:
sbt githubWorkflowGenerate && bash infra/ci/fix-workflows.sh
*/
def workflowJobMinikube(jobName: String, k8sServerVersion: String) = {
WorkflowJob(
id = jobName,
name = jobName,
steps = List(
WorkflowStep.Checkout,
WorkflowStep.Use(
ref = UseRef.Public(owner = "manusa", repo = "actions-setup-minikube", ref = "v2.5.0"),
params = Map(
"minikubeversion" -> "v1.23.2",
"kubernetesversion" -> "v1.19.6",
"githubtoken" -> "${{ secrets.GITHUB_TOKEN }}")),
"minikubeversion" -> "v1.23.2",
"kubernetesversion" -> k8sServerVersion,
"githubtoken" -> "${{ secrets.GITHUB_TOKEN }}")),
WorkflowStep.Sbt(
List("It/test")
)
)
)),
)
}

inThisBuild(List(
githubWorkflowScalaVersions := supportedScalaVersion,
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "It/compile"))),
githubWorkflowAddedJobs := Seq(
workflowJobMinikube(jobName = "integration-kubernetes-v1-19", k8sServerVersion = "v1.19.6"),
workflowJobMinikube(jobName = "integration-kubernetes-v1-20", k8sServerVersion = "v1.20.11")
),
githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ci-release"),
Expand Down Expand Up @@ -145,6 +155,7 @@ lazy val skuber= (project in file("client"))
libraryDependencies += scalaTest % "it"
)


lazy val examples = (project in file("examples"))
.settings(
commonSettings,
Expand Down
Loading

0 comments on commit 95ae7fd

Please sign in to comment.