Skip to main content

Scala

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm scala test
fluentci run --wasm scala compile

Commands​

NameDescription
setupInstall a specific version of Sbt
compileCompile sources
cleanDeletes files produced by the build, such as generated sources, compiled classes, and task caches.
docGenerate API documentation
packageProduces the main artifact, such as a binary jar. This is typically an alias for the task that actually does the packaging.
package_binProduces a main artifact, such as a binary jar.
package_docProduces a documentation artifact, such as a jar containing API documentation.
package_srcProduces a source artifact, such as a jar containing sources and resources.
publishPublishes artifacts to a repository.
publish_localPublishes artifacts to the local Ivy repository.
publish_m2Publishes artifacts to the local Maven repository.
testExecutes the tests.

Code examples​

Add fluentci-pdk crate to your Cargo.toml:

[dependencies]
fluentci-pdk = "0.2.1"

Use the following code to call a module function:

use fluentci_pdk::dag;

// ...

dag().call(
"https://pkg.fluentci.io/[email protected]?wasm=1",
"test",
vec![],
);
dag().call(
"https://pkg.fluentci.io/[email protected]?wasm=1",
"compile",
vec![],
);

CI/CD pipeline integrations​

The following examples show how to integrate FluentCI with popular CI providers to build and test Scala projects:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: test
run: fluentci run --wasm sbt test
- name: build
run: fluentci run --wasm sbt compile