Skip to content

Commit

Permalink
Update dependencies and refactor actions workflow (#41)
Browse files Browse the repository at this point in the history
* Update apache poi to 5.2.5 and spark to 3.5.1

* Update scalaTestVersion

* Refactor actions workflow

* Rollback scala version update due to incompatibilities with coverage dependency

* Revert package upload path in actions
  • Loading branch information
josecsotomorales authored Jun 27, 2024
1 parent 632cbe1 commit 58da865
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/spark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
types: [ opened, reopened ]
workflow_dispatch:


jobs:
build:
strategy:
Expand All @@ -17,30 +16,39 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Checkout with LFS
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4.1.7
with:
lfs: true

- name: Set up JDK 8
uses: actions/setup-java@v3.11.0
uses: actions/setup-java@v4.2.1
with:
java-version: '8'
distribution: 'adopt'

- name: Cache SBT dependencies
uses: actions/[email protected]
with:
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}-${{ matrix.sparkVersion }}
restore-keys: |
${{ runner.os }}-sbt-${{ matrix.sparkVersion }}
- name: Run tests and produce coverage
run: sbt -DsparkVersion="${{matrix.sparkVersion}}" clean coverageOn test coverageReport

- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./target/spark-${{ matrix.sparkVersion }}/scala-2.12/coverage-report/cobertura.xml
env_vars: ${{ matrix.sparkVersion }}
fail_ci_if_error: true
name: spark-excel
# path_to_write_report: ./target/spark-${{ matrix.sparkVersion }}/scala-2.12/coverage-report/codecov_report.txt
verbose: true

- name: Create assembly
Expand All @@ -52,4 +60,4 @@ jobs:
uses: actions/[email protected]
with:
path: ./target/spark-${{ matrix.sparkVersion }}/scala-2.12/spark-excel*.jar
if-no-files-found: warn
if-no-files-found: warn
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ libraryDependencies ++= Seq(
"org.apache.poi" % "poi-ooxml-lite" % poiVersion.value % Compile,
"org.apache.commons" % "commons-compress" % "1.26.1" % Compile,
"org.apache.commons" % "commons-collections4" % "4.4" % Compile,
"commons-io" % "commons-io" % "2.15.1" % Compile,
"commons-io" % "commons-io" % "2.16.1" % Compile,
"org.apache.logging.log4j" % "log4j-core" % log4JVersion.value % Compile,
"org.apache.logging.log4j" % "log4j-api" % log4JVersion.value % Compile
)
Expand Down Expand Up @@ -132,8 +132,8 @@ val commonSettings = Seq(
"2.12.15"
}
},
scalaTestVersion := "3.2.17",
scalaTestVersion := "3.2.18",
poiVersion := "5.2.5",
log4JVersion := "2.22.0",
log4JVersion := "2.23.1",
crossVersion := CrossVersion.disabled
)

0 comments on commit 58da865

Please sign in to comment.