Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#63 create build matrix and build action #64

Merged
merged 59 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2d21203
fixes #63 - added some configs variables for stb and jacoco code cove…
TebaleloS Jul 20, 2023
14d646d
fixes #63 - added more configs variables for stb
TebaleloS Jul 21, 2023
3eb3bc2
fixes #63 - added GitHub workflow Actions
TebaleloS Jul 21, 2023
6ce13a7
fixes #63 - added license
TebaleloS Jul 21, 2023
477668c
fixes #63
TebaleloS Jul 21, 2023
b5eeb81
fixes #63
TebaleloS Jul 21, 2023
5e515f4
* Fixed `ProjectMatrix`
benedeki Jul 21, 2023
baf028e
* fixed bugs preventing project load and compilation
benedeki Jul 25, 2023
4986ee3
Fixes #63 - Emplementing jacoco setup
TebaleloS Jul 25, 2023
5b45f64
Fixes #63 - implementing jacoco setup
TebaleloS Jul 26, 2023
51b9e1c
Fixes #63 - implementing jacoco setup
TebaleloS Jul 26, 2023
15e9cda
Fixes #63 - implementing jacoco setup
TebaleloS Jul 26, 2023
cad07a8
Fixes #63 - Fixing license
TebaleloS Jul 26, 2023
6f28029
Fixes #63 - Fixing license
TebaleloS Jul 26, 2023
f857c6c
Fixes #63 - removed license_check and CODEOWNERS files
TebaleloS Jul 26, 2023
4fc19ad
Update project/plugins.sbt
TebaleloS Jul 28, 2023
0613062
Update project/plugins.sbt
TebaleloS Jul 28, 2023
7d8e344
Fixes #63 - Added jacoco workflow
TebaleloS Jul 30, 2023
7b27dd1
Merge remote-tracking branch 'origin/feature/#63-Create-build-matrix-…
TebaleloS Jul 30, 2023
74f762f
Fixes #63 - Added dependent_items.yml
TebaleloS Jul 30, 2023
4f963b9
Fixes #63 - Added dependent_items.yml
TebaleloS Jul 31, 2023
66fec6c
Merge branch 'master' into feature/#63-Create-build-matrix-and-build-…
TebaleloS Jul 31, 2023
618ee83
Fixes #63
TebaleloS Jul 31, 2023
0b73dd6
Fixes #63
TebaleloS Jul 31, 2023
f69adb2
Fixes #63
TebaleloS Aug 1, 2023
1957781
Fixes #63
TebaleloS Aug 1, 2023
53a72bc
Fixes #63
TebaleloS Aug 1, 2023
d6d66ba
Fixes #63
TebaleloS Aug 1, 2023
3e0314e
Fixes #63
TebaleloS Aug 2, 2023
f0f218d
* Proposal of adding Jacoco support for server module.
miroslavpojer Aug 2, 2023
41d5b7f
Fixes #63
TebaleloS Aug 2, 2023
14e6786
Fixes #63
TebaleloS Aug 2, 2023
8bd231a
Fixes #63
TebaleloS Aug 2, 2023
9ce6156
Fixes #63
TebaleloS Aug 2, 2023
e8f20f4
Fixes #63
TebaleloS Aug 2, 2023
2a022d5
Fixes #63
TebaleloS Aug 2, 2023
2701685
Fixes #63
TebaleloS Aug 2, 2023
c08bbbe
Fixes #63
TebaleloS Aug 2, 2023
1d432d1
Fixes #63
TebaleloS Aug 2, 2023
12229b3
Fixes #63
TebaleloS Aug 2, 2023
ab2dbff
Fixes #63
TebaleloS Aug 2, 2023
3c2457d
Fixes #63
TebaleloS Aug 2, 2023
148c856
Fixes #63
TebaleloS Aug 2, 2023
a988abd
* Proposal for change.
miroslavpojer Aug 3, 2023
095e735
* Return back the title with spark major version now.
miroslavpojer Aug 3, 2023
9000ad0
Fixes #63
TebaleloS Aug 3, 2023
3963bff
Fixes #63 - added license
TebaleloS Aug 3, 2023
f481bc6
Update .github/workflows/jacoco_check.yml
TebaleloS Aug 3, 2023
ce44d96
Update .github/workflows/jacoco_check.yml
TebaleloS Aug 3, 2023
a67dade
Fixes #63 - update build.sbt
TebaleloS Aug 3, 2023
ff74223
Fixes #63 - update publish.sbt
TebaleloS Aug 3, 2023
33f3a40
Merge remote-tracking branch 'origin/feature/#63-Create-build-matrix-…
TebaleloS Aug 3, 2023
a071931
Fixes #63 - update publish.sbt
TebaleloS Aug 4, 2023
69540df
Fixes #63
TebaleloS Aug 4, 2023
064ab03
Fixes #63
TebaleloS Aug 8, 2023
fdb86e3
Fixes #63
TebaleloS Aug 8, 2023
d244a4b
Fixes #63
TebaleloS Aug 9, 2023
723246d
Closes #63
TebaleloS Aug 10, 2023
26c3506
Closes #63 - Added notes for jacoco coverage and realse in the readme…
TebaleloS Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/assign_issue_to_project.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Auto Assign Issue to Project

on:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Build

on:
pull_request:
branches: [ master ]
types: [ opened, synchronize, reopened ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: coursier/cache-action@v5
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"
- name: Build and run tests
run: sbt test doc
16 changes: 16 additions & 0 deletions .github/workflows/dependent_items.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Dependent Issues

on:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: FormatCheck

on:
pull_request:
branches: [ master, develop ]
types: [ assigned, opened, synchronize, reopened, labeled ]

jobs:
scalafmt:
runs-on: ubuntu-latest
name: Scalafmt Check
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"

- name: Run scalafmt And Print Diff
continue-on-error: true
run: sbt scalafmt scalafmtSbt && git diff --exit-code
88 changes: 88 additions & 0 deletions .github/workflows/jacoco_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: JaCoCo report

on:
pull_request:
branches: [ master ]
types: [ opened, edited, synchronize, reopened ]

jobs:
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
include:
# The project supports Scala 2.11, 2.12 and the default version of spark2
# The CI runs all tests suites for all supported Scala versions at build.yml
# The codebase for all Scala versions is the same, so the coverage is calculated only once
# Scala 2.12 is chosen since it is supported by the most wide range of Spark versions and
# vendor distributions.
- scala: 2.12.12
scalaShort: "2.12"
overall: 80.0
changed: 80.0
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 ++${{matrix.scala}} jacoco
# Agent module code coverage
- name: Add coverage to PR
id: jacoco-agent
uses: madrapps/jacoco-report@v1.3
with:
name: agent-jacoco-report
paths: ${{ github.workspace }}/agent/target/spark2-jvm-${{ matrix.scalaShort }}/jacoco/report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{matrix.overall }}
min-coverage-changed-file: ${{ matrix.changed }}
title: JaCoCo agent module code coverage report - spark:2 - scala ${{ matrix.scala }}
update-comment: true
# server module code coverage
- name: Add coverage to PR
id: jacoco-server
uses: madrapps/jacoco-report@v1.3
with:
name: server-jacoco-report
paths: ${{ github.workspace }}/server/target/jvm-${{ matrix.scalaShort }}/jacoco/report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{matrix.overall }}
min-coverage-changed-file: ${{ matrix.changed }}
title: JaCoCo server module code coverage report - scala ${{ matrix.scala }}
update-comment: true
- name: Get the Coverage info
run: |
echo "Total agent module coverage ${{ steps.jacoco-agent.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco-agent.outputs.coverage-changed-files }}"
echo "Total sever module coverage ${{ steps.jacoco-server.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco-server.outputs.coverage-changed-files }}"
- name: Fail PR if changed files coverage is less than ${{ matrix.changed }}%
if: |
${{ steps.jacoco-agent.outputs.coverage-changed-files < 80.0 }} &&
${{ steps.jacoco-server.outputs.coverage-changed-files < 80.0 }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('Changed files coverage is less than ${{ matrix.changed }}%!')


34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Copyright 2021 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Release
on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
lsulak marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 23 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the reference to this file into README.md like we have it in other libs


Releases of this library are currently handled by [sbt-ci-release](https://github.com/sbt/sbt-ci-release).
Please see its documentation for more details about how it works if you are interested to know more.

The actual deployments are triggered manually by the maintainers of this repository, using `workflow_dispatch` event
trigger.

Once changes from a PR were reviewed and merged into the master branch, follow these steps:
1. Create a new Git Tag and push it to the repository, to the master branch. For example,
if you want to release a version 0.4.0 (note that we are using [Semantic Versioning](https://semver.org/)):

```shell
git tag -a v0.4.0 -m "v0.4.0"
git push origin v0.4.0
```

2. In GitHub UI, go to the repository's **Actions** -> **Release** -> **Run workflow**, and under **Use workflow from**
use **Tags** and find the tag you created in the previous step.

> **Important note**: don't run the workflow against the master branch, but against the tag.
> `sbt-ci-release` plugin won't be able to correctly find tag, and it will think that you are trying
> to do a snapshot release, not an actual release that should be synchronized with Maven Central.
16 changes: 16 additions & 0 deletions agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.atum.agent

import za.co.absa.atum.agent.model.MeasureResult
Expand Down
16 changes: 16 additions & 0 deletions agent/src/main/scala/za/co/absa/atum/agent/AtumContext.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.atum.agent

import org.apache.spark.sql.DataFrame
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.atum.agent.core

import org.apache.spark.sql.DataFrame
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.atum.agent.model

case class MeasureResult(measurement: Measurement, result: String)
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2021 ABSA Group Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package za.co.absa.atum.agent.model

import org.apache.spark.sql.functions._
Expand Down
Loading
Loading