Update sbt-scalafmt to 2.5.3 #107
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: [ opened, reopened, synchronize ] | |
env: | |
HELLO: world | |
jobs: | |
env: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set context | |
run: | | |
echo "LATEST_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | |
echo "CURRENT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
echo "SHORT_CURRENT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "CURRENT_SHA_ALT=$(git rev-parse ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV | |
echo "SHORT_CURRENT_SHA_ALT=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV | |
- name: Debug context | |
run: | | |
echo LATEST_TAG: ${{ env.LATEST_TAG }} | |
echo CURRENT_SHA: ${{ env.CURRENT_SHA }} | |
echo SHORT_CURRENT_SHA: ${{ env.SHORT_CURRENT_SHA }} | |
echo CURRENT_SHA_ALT: ${{ env.CURRENT_SHA_ALT }} | |
echo SHORT_CURRENT_SHA_ALT: ${{ env.SHORT_CURRENT_SHA_ALT }} | |
scalafmt: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
job: ci | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Java env | |
shell: bash | |
run: | # Copied from https://github.com/graalvm/setup-graalvm#quickstart-template | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image --version | |
- name: Use CI sbt jvmopts | |
shell: bash | |
run: | | |
mv .jvmopts-ci .jvmopts | |
cat .jvmopts | |
- name: scalafmt | |
run: sbt 'scalafmtCheckAll' # https://scalameta.org/scalafmt/docs/installation.html#task-keys | |
scalafix: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- run: env | |
- uses: actions/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
job: ci | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Java env | |
shell: bash | |
run: | # Copied from https://github.com/graalvm/setup-graalvm#quickstart-template | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image --version | |
- name: Use CI sbt jvmopts | |
shell: bash | |
run: | | |
mv .jvmopts-ci .jvmopts | |
cat .jvmopts | |
- name: scalafix | |
run: sbt 'scalafixAll --check' # https://scalacenter.github.io/scalafix/docs/users/installation.html#enforce-in-ci | |
unit-tests: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- run: env | |
- uses: actions/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
job: ci | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Java env | |
shell: bash | |
run: | # Copied from https://github.com/graalvm/setup-graalvm#quickstart-template | |
echo "GRAALVM_HOME: $GRAALVM_HOME" | |
echo "JAVA_HOME: $JAVA_HOME" | |
java --version | |
native-image --version | |
- name: Use CI sbt jvmopts | |
shell: bash | |
run: | | |
mv .jvmopts-ci .jvmopts | |
cat .jvmopts | |
- name: Run tests | |
shell: bash | |
run: sbt 'clean;coverage;test;coverageReport' | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: modules/*/target/*/scoverage-report/scoverage.xml |