Skip to main content

Flutter

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm flutter code_quality
fluentci run --wasm flutter test
fluentci run --wasm flutter build apk --release apk --release

Commands​

NameDescription
setupInstall Flutter SDK
code_qualityRun static code analysis
testRun test-suites
buildCompile and bundle the project

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",
"code_quality",
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!["apk", "--release"],
);

CI/CD pipeline integrations​

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

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: code_quality
run: fluentci run --wasm flutter code_quality
- name: test
run: fluentci run --wasm flutter test
- name: build
run: fluentci run --wasm flutter build apk --release