Skip to content

Commit

Permalink
#9 Add test github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Zejnilovic authored Jan 20, 2021
1 parent 2f5662d commit 5ec6d7e
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true

[*.xml]
indent_size = 4
indent_style = space
insert_final_newline = true

[*.properties]
insert_final_newline = true

[*.{java,scala,js,json,css}]
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

## Background
A clear and concise description of where the limitation lies.

## Feature
A description of the requested feature.

## Example [Optional]
A simple example if applicable.

## Proposed Solution [Optional]
Solution Ideas
1.
2.
3.
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Run Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-scala-2_11-spark-2_4:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"
- name: Build and run tests
run: sbt ++2.11.12 test -DSPARK_VERSION=2.4.7
build-scala-2_12-spark-2_4:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"
- name: Build and run tests
run: sbt ++2.12.12 test -DSPARK_VERSION=2.4.7
build-scala-2_12-spark-3_0:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"
- name: Build and run tests
run: sbt ++2.12.12 test -DSPARK_VERSION=3.0.1
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ ThisBuild / crossScalaVersions := Seq(scala211, scala212)
// Scala shouldn't be packaged so it is explicitly added as a provided dependency below
ThisBuild / autoScalaLibrary := false

lazy val printSparkVersion = taskKey[Unit]("Print Spark version spark-cobol is building against.")

lazy val hofs = (project in file("."))
.settings(
name := "spark-hofs",
printSparkVersion := {
val log = streams.value.log
log.info(s"Building with Spark $sparkVersion")
sparkVersion
},
libraryDependencies ++= SparkHofsDependencies :+ getScalaDependency(scalaVersion.value),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
Test / fork := true
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import sbt._

object Dependencies {

private val sparkVersion = "2.4.4"
def sparkVersion: String = sys.props.getOrElse("SPARK_VERSION", "2.4.7")

private val scalatestVersion = "3.0.3"

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.6
sbt.version=1.4.6

0 comments on commit 5ec6d7e

Please sign in to comment.