Skip to content

Commit

Permalink
Add Scala.js Support (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
reid-spencer authored Aug 15, 2024
1 parent 7b73118 commit 6fcd658
Show file tree
Hide file tree
Showing 580 changed files with 8,769 additions and 7,026 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,34 @@ jobs:
HUGO_VERSION: 0.112.0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Set Up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'adopt-hotspot'

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.112.0'
extended: true

- name: Install Dart Sass
run: sudo snap install dart-sass

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Generate ScalaDoc
run: |
sbt doc/test doc/unidoc
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
Expand All @@ -64,9 +79,8 @@ jobs:
cd doc/src/main/hugo ; \
hugo --minify --baseURL "https://riddl.tech" \
--printMemoryUsage --noBuildLock --cleanDestinationDir \
--enableGitInfo --noBuildLock --printPathWarnings --printMemoryUsage ; \
cd ../../../.. ; \
sbt "project doc" "test"
--enableGitInfo --noBuildLock --printPathWarnings --printMemoryUsage
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,33 @@ jobs:
- name: Coursier Caching
uses: coursier/cache-action@v6

- name: Build, Run Test, Coverage
- name: Build, Run Test
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: Scala ${{ matrix.scala }}
RIDDLC_PATH: riddlc/target/universal/stage/bin/riddlc
run: |
sbt -v clean coverage Test/compile test coverageAggregate coveralls
sbt -v clean Test/compile test
- name: Archive code coverage results
- name: Coverage For JVM projects only
run: |
sbt -v clean coverage \
utils/test language/test passes/test language/test diagrams/test \
command/test diagrams/test command/test prettify/test hugo/test \
commands/test riddlc/test coverageAggregate coveralls
- name: Coverage Results Collection
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: |
- **/target/scala-3.4.1/scoverage-report/scoverage.xml
- target/scala-3.4.1/scoverage-report/scoverage.xml
- **/target/scala-3.4.2/scoverage-report/scoverage.xml
- target/scala-3.4.2/scoverage-report/scoverage.xml
- sbt-riddl/target/scala-2.12/scoverage-report/scoverage.xml
- name: Test sbt-riddl plugin
env:
RIDDLC_PATH: riddlc/target/universal/stage/bin/riddlc
run: |
export RIDDLC_PATH=riddlc/target/universal/stage/bin/riddlc
sbt -v clean compile publishLocal "project riddlc" "stage" "project sbt-riddl" scripted
sbt -v clean compile publishLocal riddlc/stage sbt-riddl/scripted
- name: Cleanup Before Caching
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ target
*.lock
/hugo-input/
/scoverage-report/
/package-lock.json
/node_modules
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Documentation Build Status](https://github.com/ossuminc/riddl/actions/workflows/hugo.yml/badge.svg)](https://github.com/ossuminc/riddl/actions/workflows/hugo.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/ossuminc/riddl/badge.svg?branch=main)](https://coveralls.io/github/ossuminc/riddl?branch=main)
[![Maven Central](https://img.shields.io/maven-central/v/com.ossuminc/riddlc_3.svg)](https://maven-badges.herokuapp.com/maven-central/com.ossuminc/riddlc_3)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.16.0.svg)](https://www.scala-js.org)

[![CLA assistant](https://cla-assistant.io/readme/badge/ossuminc/riddl)](https://cla-assistant.io/ossuminc/riddl)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)
Expand Down
Loading

0 comments on commit 6fcd658

Please sign in to comment.