Skip to content

Commit

Permalink
Improved CI - check fmt (#156)
Browse files Browse the repository at this point in the history
* Improved CI
Changed the scala setup plugin to a maintained action.
Pipeline to check if the format is correct.
Added a cache to improve the speed in CI runs.
Updated checkout action to the latest version.

* Update spark versions to latest.
  • Loading branch information
alfonsorr authored Sep 13, 2024
1 parent 934553e commit 0f5e839
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI-quality
on:
push:
branches:
- main
pull_request:

jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
with:
extraKey: quality-check
- uses: coursier/setup-action@v1
with:
jvm: zulu:8
- name: ScalaFmt
id: fmt
run: sbt scalafmtCheckAll
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ jobs:
strategy:
fail-fast: false
matrix:
spark: ["3.1.3","3.2.1", "3.3.2", "3.4.3", "3.5.1"]
spark: ["3.1.3","3.2.4", "3.3.4", "3.4.3", "3.5.1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
with:
extraKey: ${{ matrix.spark }}
- uses: coursier/setup-action@v1
with:
jvm: zulu:8
- name: Test
run: sbt -Dspark.testVersion=${{ matrix.spark }} +test
- name: Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object SchemaComparer {
ignoreNullable: Boolean = false,
ignoreColumnNames: Boolean = false,
ignoreColumnOrder: Boolean = true
) = {
): Unit = {
require((ignoreColumnNames, ignoreColumnOrder) != (true, true), "Cannot set both ignoreColumnNames and ignoreColumnOrder to true.")
if (!SchemaComparer.equals(actualDS.schema, expectedDS.schema, ignoreNullable, ignoreColumnNames, ignoreColumnOrder)) {
throw DatasetSchemaMismatch(
Expand Down

0 comments on commit 0f5e839

Please sign in to comment.