stevedlawrence commented on code in PR #984:
URL: https://github.com/apache/daffodil/pull/984#discussion_r1132368296
##########
.github/workflows/main.yml:
##########
@@ -198,8 +188,55 @@ jobs:
args: -Dproject.settings=.sonar-project.properties
- # Ensure pull requests only have a single commit
+ # Lint checks that do not require compilation
+ lint:
+ name: Lint Checks
+ strategy:
+ fail-fast: false
+ matrix:
+ java_distribution: [ temurin ]
+ java_version: [ 17 ]
+ scala_version: [ 2.12.17 ]
+ os: [ ubuntu-22.04 ]
+ runs-on: ${{ matrix.os }}
+ env:
+ SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }}
+ steps:
+
+ ############################################################
+ # Setup
+ ############################################################
+
+ - name: Check out Repository
+ uses: actions/[email protected]
+ with:
+ fetch-depth: 0
+
+ - name: Setup Java
+ uses: actions/[email protected]
+ with:
+ distribution: ${{ matrix.java_distribution }}
+ java-version: ${{ matrix.java_version }}
+ cache: sbt
+
+ ############################################################
+ # Lint checks
+ ############################################################
+ - name: Run Rat Check
+ if: success() || failure()
+ run: $SBT ratCheck || (cat target/rat.txt; exit 1)
+
+ - name: Run OSGI Check
+ if: success() || failure()
+ run: $SBT osgiCheck
+
+ - name: Run scalafmt Check
+ if: success() || failure()
Review Comment:
Yeah, using `always()` feels like the obvious choice, but the `success() ||
failure()` idiom is recommended in the GitHub Actions documentation for the
reason you mention:
https://docs.github.com/en/actions/learn-github-actions/expressions#always
Seems like `always` should be used very rarely in favor of this `success()
|| failure()` idiom.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]