Skip to main content

Swift

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm swift test
fluentci run --wasm swift build

Commands​

NameDescription
setupInstall Swift
buildCompile targets within the project
testRun test-suites

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",
"build",
vec![],
);

CI/CD pipeline integrations​

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