Skip to main content

Purescript

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm purescript install
fluentci run --wasm purescript test
fluentci run --wasm purescript build

Commands​

NameDescription
setupInstall a specific version of Purescript.
buildInstall the dependencies and compile the current package
testTest the project with some module, default Test.Main
bundle_appBundle the project into an executable
bundle_moduleBundle the project into a module
docsGenerate docs for the project and its dependencies
installInstall (download) all dependencies listed in spago.dhall
verifyVerify that a single package is consistent with the Package Set
verify_setVerify that the whole Package Set builds correctly
bump_versionBump and tag a new version, and generate bower.json, in preparation for release.

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",
"install",
vec![],
);
dag().call(
"https://pkg.fluentci.io/[email protected]?wasm=1",
"test",
vec![],
);
dag().call(
"https://pkg.fluentci.io/[email protected]?wasm=1",
"build",
vec![],
);

CI/CD pipeline integrations​

The following examples show how to integrate FluentCI with popular CI providers to build and test Purescript 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: install dependencies
run: fluentci run --wasm purescript install
- name: test
run: fluentci run --wasm purescript test
- name: build
run: fluentci run --wasm purescript build