Skip to content

Commit

Permalink
Refactor actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
josecsotomorales committed Jun 26, 2024
1 parent 9dab485 commit bf18097
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 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 @@ -51,5 +59,5 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
uses: actions/[email protected]
with:
path: ./target/spark-${{ matrix.sparkVersion }}/scala-2.12/spark-excel*.jar
if-no-files-found: warn
path: ./target/scala-2.12/spark-excel*.jar
if-no-files-found: warn

0 comments on commit bf18097

Please sign in to comment.