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

#126: Bring workflow actions up to date #127

Merged
merged 24 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/codeowners
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @benedeki @dk1844 @jakipatryk @lsulak @Zejnilovic
* @benedeki @dk1844 @jakipatryk @lsulak @Zejnilovic @salamonpavel @miroslavpojer
2 changes: 1 addition & 1 deletion .github/workflows/assign_issue_to_project.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Auto Assign Issue to Project
name: Assign Issue to Project

on:
issues:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ on:
types: [ assigned, opened, synchronize, reopened, labeled ]

jobs:
build:
build-test-and-doc:
name: Build, Test and Doc
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -42,7 +43,6 @@ jobs:
fail-fast: false
matrix:
scala: [2.12.17, 2.13.12]
name: Build and test
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -52,7 +52,9 @@ jobs:
java-version: "[email protected]"
- name: Build and run unit tests
run: sbt ++${{matrix.scala}} test
- name: Generate documentation
run: sbt ++${{matrix.scala}} doc
- name: Prepare testing database
run: sbt flywayMigrate
- name: Build and run integration tests
run: sbt ++${{matrix.scala}} testIT doc
- name: Run integration tests
run: sbt ++${{matrix.scala}} testIT
5 changes: 3 additions & 2 deletions .github/workflows/dependent_items.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependent Issues
name: Dependent Items

on:
issues:
Expand All @@ -24,7 +24,8 @@ on:
- cron: '0 0 * * *'

jobs:
check:
dependent-items-check:
name: Dependent Items Check
runs-on: ubuntu-latest
steps:
- uses: z0al/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
# limitations under the License.
#

name: Build
name: JaCoCo Report

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

jobs:
jacoco:
build-test-and-measure:
name: "Build, Test and Measure"
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -41,9 +42,6 @@ jobs:
env:
SCALA_VERSION: "2.13.12"
SCALA_SHORT_VERSION: "2.13"
COVERAGE_OVERALL_EXPECTATION: 75.0
COVERAGE_CHANGED_EXPECTATION: 80.0
name: Build and run JaCoCo
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -62,8 +60,8 @@ jobs:
paths: >
${{ github.workspace }}/core/target/scala-${{ env.SCALA_SHORT_VERSION }}/jacoco/report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{ env.COVERAGE_OVERALL_EXPECTATION }}
min-coverage-changed-files: ${{ env.COVERAGE_CHANGED_EXPECTATION }}
min-coverage-overall: ${{ 57.0 }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are {{ }} still needed if inside is a number?
I believe we talked about removing these constants, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Here, I pointed to 1st location where I saw it. This is on more locations in yml file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Completely rewritten.

min-coverage-changed-files: ${{ 80.0 }}
title: JaCoCo core code coverage report - scala ${{ env.SCALA_VERSION }}
update-comment: true
- name: Get the Coverage info
Expand All @@ -77,8 +75,8 @@ jobs:
paths: >
${{ github.workspace }}/slick/target/scala-${{ env.SCALA_SHORT_VERSION }}/jacoco/report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{ env.COVERAGE_OVERALL_EXPECTATION }}
min-coverage-changed-files: ${{ env.COVERAGE_CHANGED_EXPECTATION }}
min-coverage-overall: ${{ 57.0 }}
min-coverage-changed-files: ${{ 80.0 }}
title: JaCoCo slick code coverage report - scala ${{ env.SCALA_VERSION }}
update-comment: true
- name: Get the Coverage info
Expand All @@ -92,23 +90,24 @@ jobs:
paths: >
${{ github.workspace }}/doobie/target/scala-${{ env.SCALA_SHORT_VERSION }}/jacoco/report/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{ env.COVERAGE_OVERALL_EXPECTATION }}
min-coverage-changed-files: ${{ env.COVERAGE_CHANGED_EXPECTATION }}
min-coverage-overall: ${{ 57.0 }}
min-coverage-changed-files: ${{ 80.0 }}
title: JaCoCo doobie code coverage report - scala ${{ env.SCALA_VERSION }}
update-comment: true
- name: Get the Coverage info
run: |
echo "Total doobie coverage ${{ steps.jacoco-doobie.outputs.coverage-overall }}"
echo "Changed doobie Files coverage ${{ steps.jacoco-doobie.outputs.coverage-changed-files }}"
- name: Fail PR if changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%
- name: Fail PR if changed files coverage is less than ${{ 80.0 }}%
if: ${{ steps.jacoco-core.outputs.coverage-changed-files < 80.0 || steps.jacoco-slick.outputs.coverage-changed-files < 80.0 || steps.jacoco-doobie.outputs.coverage-changed-files < 80.0 }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('Changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%!')
- name: Fail PR if total files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%
if: ${{ steps.jacoco-core.outputs.coverage-overall < 75.0 || steps.jacoco-slick.outputs.coverage-overall < 75.0 || steps.jacoco-doobie.outputs.coverage-overall < 75.0 }}
core.setFailed('Changed files coverage is less than ${{ 80.0 }}%!')
- name: Fail PR if total files coverage is less than ${{ 57.0 }}%
if: ${{ steps.jacoco-core.outputs.coverage-overall < 57.0 || steps.jacoco-slick.outputs.coverage-overall < 57.0 || steps.jacoco-doobie.outputs.coverage-overall < 57.0 }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('Total files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%!')
core.setFailed('Total files coverage is less than ${{ 57.0 }}%!')

3 changes: 2 additions & 1 deletion .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ on:
types: [ assigned, opened, synchronize, reopened, labeled ]

jobs:
license-test:
license-check:
name: License Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/test_filenames_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright 2022 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: Test Filenames Check

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

jobs:
test_filenames_check:
name: Test Filenames Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Filename Inspector
id: scan-test-files
uses: AbsaOSS/filename-inspector@master
with:
name-patterns: '*UnitTests.*,*IntegrationTests.*'
paths: '**/src/test/scala/**'
report-format: 'console'
excludes: 'slick/src/test/scala/za/co/absa/fadb/slick/Actor.scala,slick/src/test/scala/za/co/absa/fadb/slick/ActorSlickConverter.scala,slick/src/test/scala/za/co/absa/fadb/slick/SlickTest.scala,doobie/src/test/scala/za/co/absa/fadb/doobie/DoobieTest.scala,slick/src/test/scala/za/co/absa/fadb/slick/OptionalActorSlickConverter.scala'
verbose-logging: 'false'
fail-on-violation: 'true'
25 changes: 25 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,34 @@ ThisBuild / developers := List(
name = "David Benedeki",
email = "[email protected]",
url = url("https://github.com/benedeki")
),
Developer(
id = "lsulak",
name = "Ladislav Sulak",
email = "[email protected]",
url = url("https://github.com/lsulak")
),
Developer(
id = "salamonpavel",
name = "Pavel Salamon",
email = "[email protected]",
url = url("https://github.com/salamonpavel")
),
Developer(
id = "miroslavpojer",
name = "Miroslav Pojer",
email = "[email protected]",
url = url("https://github.com/miroslavpojer")
),
Developer(
id = "Zejnilovic",
name = "Saša Zejnilović",
email = "[email protected]",
url = url("https://github.com/Zejnilovic")
)
)


Copy link
Contributor

Choose a reason for hiding this comment

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

Two empty lines?

ThisBuild / homepage := Some(url("https://github.com/AbsaOSS/fa-DB"))
ThisBuild / description := "DB data access via DB functions"

Expand Down
Loading