Skip to content

Commit

Permalink
fix(example): update fluentci config
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Nov 1, 2023
1 parent 0c377c0 commit 474ebb2
Show file tree
Hide file tree
Showing 178 changed files with 5,493 additions and 101 deletions.
2 changes: 1 addition & 1 deletion example/.fluentci/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: deno install -A -r https://cli.fluentci.io -n fluentci
- name: Setup Dagger
run: |
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh
sudo mv bin/dagger /usr/local/bin
dagger version
- name: Run Dagger Pipelines
Expand Down
4 changes: 2 additions & 2 deletions example/.fluentci/.github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
run: deno install -A -r https://cli.fluentci.io -n fluentci
- name: Setup Dagger
run: |
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.8 sh
sudo mv bin/dagger /usr/local/bin
dagger version
- name: Run Dagger Pipelines
run: dagger run deno run -A ../src/dagger/runner.ts
run: dagger run deno run -A ../src/dagger/runner.ts clippy test llvm_cov build
working-directory: example
5 changes: 3 additions & 2 deletions example/.fluentci/.github/workflows/zenith.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Zenith Example
on:
push:
branches:
- zenith
- main

jobs:
tests:
Expand All @@ -18,6 +18,7 @@ jobs:
dagger version
- name: Run Dagger Pipelines
run: |
dagger query --doc build.gql
dagger query --doc test.gql
dagger query --doc llvm_cov.gql
dagger query --doc build.gql
working-directory: example
32 changes: 17 additions & 15 deletions example/.fluentci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline)
[![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline)
![deno compatibility](https://shield.deno.dev/deno/^1.34)
![deno compatibility](https://shield.deno.dev/deno/^1.37)
[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline)

A ready-to-use CI/CD Pipeline for your Rust projects.
Expand Down Expand Up @@ -37,25 +37,27 @@ fluentci run .

## Jobs

| Job | Description |
| ----- | ------------------ |
| build | build your project |
| test | Run your tests |
| Job | Description |
| -------- | ------------------------------- |
| clippy | Run Rust Clippy on your project |
| build | Build your project |
| test | Run your tests |
| llvm_cov | Generate llvm coverage report |

```graphql
build(src: String!): String
clippy(src: String!): String
test(src: String!): String
llvmCov(src: String!): String
```

## Programmatic usage

You can also use this pipeline programmatically:

```ts
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import { build, test } from "https://pkg.fluentci.io/rust_pipeline@v0.5.2/mod.ts";

function pipeline(src = ".") {
connect(async (client: Client) => {
await test(client, src);
await build(client, src);
});
}
import { build, test } from "https://pkg.fluentci.io/rust_pipeline@v0.6.3/mod.ts";

pipeline();
await test();
await build();
```
13 changes: 3 additions & 10 deletions example/.fluentci/ci.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import {
build,
test,
} from "https://pkg.fluentci.io/rust_pipeline@v0.5.2/mod.ts";
} from "https://pkg.fluentci.io/rust_pipeline@v0.6.3/mod.ts";

function pipeline(src = ".") {
connect(async (client: Client) => {
await test(client, src);
await build(client, src);
});
}

pipeline();
await test();
await build();
114 changes: 53 additions & 61 deletions example/.fluentci/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions example/.fluentci/deps.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
export { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts";
import Client from "https://sdk.fluentci.io/z1/mod.ts";
import Client from "https://sdk.fluentci.io/v0.2.0/mod.ts";
export default Client;

export {
connect,
uploadContext,
CacheSharingMode,
} from "https://sdk.fluentci.io/z1/mod.ts";
Container,
} from "https://sdk.fluentci.io/v0.2.0/mod.ts";
export { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts";
export { withDevbox } from "https://nix.fluentci.io/zenith/src/dagger/steps.ts";
export { withDevbox } from "https://nix.fluentci.io/v0.5.2/src/dagger/steps.ts";
export { stringifyTree } from "https://esm.sh/stringify-tree@1.1.1";
import gql from "https://esm.sh/graphql-tag@2.12.6";
export { gql };
Expand Down
Loading

0 comments on commit 474ebb2

Please sign in to comment.