Skip to content

Commit afaa5b6

Browse files
authored
#15: Migrated to Github Actions from Travis (#16)
Fixes #4 #15
1 parent 3958fef commit afaa5b6

30 files changed

+312
-884
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Broken Links Checker
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * *"
6+
push:
7+
8+
jobs:
9+
linkChecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
14+
with:
15+
use-quiet-mode: 'yes'
16+
use-verbose-mode: 'yes'

.github/workflows/ci-build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI Build
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
build:
8+
name: Building with Scala ${{ matrix.scala }}
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
scala: [ 2.12.14, 2.13.6 ]
14+
15+
steps:
16+
- name: Checkout the Repository
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup Java and Scala with JDK 11
22+
uses: olafurpg/setup-scala@v10
23+
with:
24+
java-version: 11
25+
26+
- name: Cache Local SBT Dependencies
27+
uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.sbt
31+
~/.ivy2/cache
32+
~/.coursier/cache/v1
33+
~/.cache/coursier/v1
34+
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
35+
restore-keys: |
36+
${{ runner.os }}-sbt-cache-
37+
38+
- name: Check Formatting
39+
run: sbt ++${{ matrix.scala }} scalafmtSbtCheck scalafmtCheckAll
40+
41+
- name: Run CI
42+
run: ./scripts/ci.sh
43+
env:
44+
SCALA_VERSION: ${{ matrix.scala }}
45+
46+
- name: Upload Coverage Results to Coveralls
47+
run: sbt ++${{ matrix.scala }} coveralls
48+
env:
49+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
51+
# This required because of the sonarcloud-github-action docker volume mapping.
52+
- name: Prepare for Sonar Cloud Scan
53+
if: startsWith(matrix.scala, '2.13')
54+
run: |
55+
find . -name scoverage.xml -exec sed -i \
56+
's#/home/runner/work/import-export-udf-common-scala/import-export-udf-common-scala#/github/workspace#g' {} +
57+
58+
- name: Sonar Cloud Scan
59+
if: startsWith(matrix.scala, '2.13')
60+
uses: sonarsource/sonarcloud-github-action@master
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
64+
65+
- name: Cleanup
66+
run: |
67+
rm -rf "$HOME/.ivy2/local" || true
68+
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
69+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
70+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
71+
find $HOME/.coursier/cache -name "*.lock" -delete || true
72+
find $HOME/.sbt -name "*.lock" -delete || true

.scalafmt.conf

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,45 @@
1+
version = 3.0.1
12
project.git = true
23

3-
maxColumn = 98
4-
docstrings = JavaDoc
4+
maxColumn = 120
5+
docstrings.style = Asterisk
6+
docstrings.wrap = "no"
57

68
align = true
79
align.openParenCallSite = false
810
align.openParenDefnSite = false
11+
align.stripMargin = true
12+
assumeStandardLibraryStripMargin = true
913
continuationIndent.defnSite = 2
10-
danglingParentheses = true
14+
danglingParentheses.preset = true
1115

12-
assumeStandardLibraryStripMargin = true
13-
rewrite.redundantBraces.stringInterpolation = true
1416
rewrite.rules = [
17+
AsciiSortImports,
18+
AvoidInfix,
19+
PreferCurlyFors,
1520
RedundantBraces,
1621
RedundantParens,
17-
PreferCurlyFors,
18-
SortImports
22+
SortModifiers
23+
]
24+
rewrite.neverInfix.excludeFilters = [
25+
at
26+
exclude
27+
excludeAll
28+
in
29+
to
30+
until
31+
]
32+
rewrite.redundantBraces.generalExpressions = false
33+
rewrite.redundantBraces.ifElseExpressions = false
34+
rewrite.redundantBraces.stringInterpolation = true
35+
rewrite.sortModifiers.order = [
36+
"`override`"
37+
"`private`"
38+
"`protected`"
39+
"`sealed`"
40+
"`abstract`"
41+
"`lazy`"
42+
"`implicit`"
43+
"`final`"
1944
]
45+
spaces.inImportCurlyBraces = false

.travis.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
# Import Export UDF Common Scala
22

3-
[![Build Status][travis-badge]][travis-link]
4-
[![Coveralls][coveralls-badge]][coveralls-link]
5-
[![Maven Central][maven-badge]][maven-link]
3+
[![Build Status](https://github.com/exasol/import-export-udf-common-scala/actions/workflows/ci-build.yml/badge.svg)](https://github.com/exasol/import-export-udf-common-scala/actions/workflows/ci-build.yml)
4+
[![Coveralls](https://img.shields.io/coveralls/exasol/import-export-udf-common-scala.svg)](https://coveralls.io/github/exasol/import-export-udf-common-scala)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.exasol/import-export-udf-common-scala)](https://search.maven.org/artifact/com.exasol/import-export-udf-common-scala)
6+
7+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
8+
9+
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=security_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
10+
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
11+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
12+
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=sqale_index)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
13+
14+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=code_smells)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
15+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=coverage)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
16+
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
17+
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Aimport-export-udf-common-scala&metric=ncloc)](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
618

719
Common libraries for Exasol IMPORT and EXPORT user defined functions in Scala
820
programming language.
@@ -60,12 +72,6 @@ These plugins help with project development.
6072
| [SBT PGP][sbt-pgp-link] | PGP plugin for `sbt` | BSD 3-Clause License |
6173
| [SBT Git][sbt-git-link] | A plugin for Git integration, used to version the release jars | BSD 2-Clause License |
6274

63-
[travis-badge]: https://img.shields.io/travis/com/exasol/import-export-udf-common-scala/main.svg?logo=travis
64-
[travis-link]: https://travis-ci.com/exasol/import-export-udf-common-scala
65-
[coveralls-badge]: https://coveralls.io/repos/github/exasol/import-export-udf-common-scala/badge.svg?branch=main
66-
[coveralls-link]: https://coveralls.io/github/exasol/import-export-udf-common-scala?branch=main
67-
[maven-badge]: https://maven-badges.herokuapp.com/maven-central/com.exasol/import-export-udf-common-scala_2.12/badge.svg
68-
[maven-link]: https://mvnrepository.com/artifact/com.exasol/import-export-udf-common-scala
6975
[apache-avro-link]: https://avro.apache.org/
7076
[scala-logging-link]: https://github.com/lightbend/scala-logging
7177
[exasol-script-api-link]: https://docs.exasol.com/database_concepts/udf_scripts.htm

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ lazy val orgSettings = Seq(
99
)
1010

1111
lazy val buildSettings = Seq(
12-
scalaVersion := "2.13.3",
13-
crossScalaVersions := Seq("2.12.12", "2.13.3")
12+
scalaVersion := "2.13.6",
13+
crossScalaVersions := Seq("2.12.14", "2.13.6")
1414
)
1515

1616
lazy val root =

doc/changes/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Releases
22

3+
* [0.3.0](changes_0.3.0.md)
34
* [0.2.0](changes_0.2.0.md)
45
* [0.1.0](changes_0.1.0.md)

doc/changes/changes_0.3.0.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Import Export UDF Common Scala 0.3.0, released 2021-??-??
2+
3+
Code name:
4+
5+
## Summary
6+
7+
## Refactoring
8+
9+
## Dependency Updates
10+
11+
### Runtime Dependency Updates
12+
13+
* Updated `com.fasterxml.jackson.core:jackson-databind:2.11.3` to `2.12.5`
14+
* Updated `com.fasterxml.jackson.module:jackson-module-scala:2.11.3` to `2.12.5`
15+
* Updated `com.typesafe.scala-logging:scala-logging:3.9.2` to `3.9.4`
16+
* Updated `org.apache.avro:avro:1.10.0` to `1.10.2`
17+
* Updated `org.slf4j:slf4j-simple:1.7.30` to `1.7.32`
18+
19+
### Test Dependency Updates
20+
21+
* Updated `org.mockito:mockito-core:test:3.6.0` to `3.12.4`
22+
* Updated `org.scalatest:scalatest:test:3.2.2` to `3.2.9`
23+
24+
### Plugin Updates
25+
26+
* Added `org.scalameta:sbt-scalafmt:2.4.3`
27+
* Updated `com.jsuereth:sbt-pgp:2.0.1` to `2.1.1`
28+
* Updated `com.timushev.sbt:sbt-updates:0.5.1` to `0.6.0`
29+
* Updated `com.typesafe.sbt:sbt-git:1.0.0` to `1.0.1`
30+
* Updated `org.scoverage:sbt-coveralls:1.2.7` to `1.3.1`
31+
* Updated `org.scoverage:sbt-scoverage:1.6.1` to `1.8.2`
32+
* Updated `org.wartremover:sbt-wartremover:2.4.12` to `2.4.16`
33+
* Updated `org.wartremover:sbt-wartremover-contib:1.3.10` to `1.3.12`
34+
* Updated `org.xerial.sbt:sbt-sonatype:3.9.4` to `3.9.10`
35+
* Removed `com.github.cb372:sbt-explicit-dependencies:0.2.15`

doc/development/developer_guide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Developer Guide
22

33
This guide provides development workflows that are used to develop and maintain
4-
the import-export-udf-common-scala and the projects based on it. It is intended for those who wish to address
5-
the issues, merge a pull request, perform release or deep dive into the codebase
6-
of the project.
4+
the import-export-udf-common-scala and the projects based on it. It is intended
5+
for those who wish to address the issues, merge a pull request, perform release
6+
or deep dive into the codebase of the project.
77

88
## Contributing
99

@@ -13,8 +13,8 @@ Please feel free to report a bug, suggest an idea for a feature, or ask a
1313
question about the code.
1414

1515
Please keep in mind that contributions are not only pull requests. They can be
16-
any helpful comment on issues, improving documentation, enhancing the build process
17-
and many other tasks.
16+
any helpful comment on issues, improving documentation, enhancing the build
17+
process and many other tasks.
1818

1919
### Getting in Touch
2020

@@ -72,15 +72,15 @@ First clone a local copy of the repository:
7272
git clone https://github.com/exasol/import-export-udf-common-scala.git
7373
```
7474

75-
Then run `./sbtx`, and run any of these commands:
75+
Then run `sbt`, and run any of these commands:
7676

7777
- `clean` : cleans previously compiled outputs; to start clean again.
7878
- `compile` : compiles the source files.
7979
- `test:compile`: compiles the unit test files.
8080
- `it:compile` : compiles the integration test files.
8181
- `test` : run all the unit tests.
8282
- `it:test` : run all the integration tests.
83-
- `doc` : generate the api documentation.
83+
- `doc` : generate the API documentation.
8484

8585
You can also run several commands combined together:
8686

@@ -95,8 +95,8 @@ to only run single file tests.
9595

9696
Inside the `scripts/` folder, you will find the `ci.sh` bash file, that runs
9797
end-to-end build process. This file is intended to be run in continuous
98-
integration (CI) environment. For the continuous integration we use the [Travis
99-
CI](https://travis-ci.com/).
98+
integration (CI) environment. For the continuous integration we use the Github
99+
Actions.
100100

101101
Please run this file to make sure that everything is working before committing
102102
code or submitting a pull request.
@@ -109,7 +109,7 @@ Additionally, ensure that the `ci.sh` scripts work with different versions of
109109
the Scala programming language. You can check that with the following command:
110110

111111
```bash
112-
TRAVIS_SCALA_VERSION=2.11.12 ./scripts/ci.sh
112+
SCALA_VERSION=2.13.6 ./scripts/ci.sh
113113
```
114114

115115
## Checking the Test Coverage

project/Dependencies.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ object Dependencies {
77

88
// Runtime dependencies versions
99
private val ExasolVersion = "6.1.7"
10-
private val AvroVersion = "1.10.0"
11-
private val JacksonVersion = "2.11.3"
12-
private val TypesafeLoggingVersion = "3.9.2"
13-
private val SLF4JVersion = "1.7.30"
10+
private val AvroVersion = "1.10.2"
11+
private val JacksonVersion = "2.12.5"
12+
private val TypesafeLoggingVersion = "3.9.4"
13+
private val SLF4JSimpleVersion = "1.7.32"
1414

1515
// Test dependencies versions
16-
private val ScalaTestVersion = "3.2.2"
16+
private val ScalaTestVersion = "3.2.9"
1717
private val ScalaTestPlusVersion = "1.0.0-M2"
18-
private val MockitoCoreVersion = "3.6.0"
18+
private val MockitoCoreVersion = "3.12.4"
1919

2020
val ExasolResolvers: Seq[Resolver] = Seq(
2121
"Exasol Releases" at "https://maven.exasol.com/artifactory/exasol-releases"
2222
)
2323

2424
lazy val RuntimeDependencies: Seq[ModuleID] = Seq(
2525
"com.exasol" % "exasol-script-api" % ExasolVersion,
26-
"org.slf4j" % "slf4j-simple" % SLF4JVersion,
26+
"org.slf4j" % "slf4j-simple" % SLF4JSimpleVersion,
2727
"com.typesafe.scala-logging" %% "scala-logging" % TypesafeLoggingVersion
2828
exclude ("org.slf4j", "slf4j-api")
2929
exclude ("org.scala-lang", "scala-library")
@@ -33,7 +33,7 @@ object Dependencies {
3333
excludeAll (
3434
ExclusionRule(organization = "com.fasterxml.jackson.core"),
3535
ExclusionRule(organization = "com.fasterxml.jackson.module")
36-
),
36+
),
3737
"com.fasterxml.jackson.core" % "jackson-databind" % JacksonVersion,
3838
"com.fasterxml.jackson.module" %% "jackson-module-scala" % JacksonVersion
3939
)

0 commit comments

Comments
 (0)