Skip to content

Commit

Permalink
Merge pull request #64 from fluentci-io/feat/new-project-from-examples
Browse files Browse the repository at this point in the history
feat(graphql): allow creating new project from examples
  • Loading branch information
tsirysndr authored Aug 30, 2024
2 parents 65813a9 + 2d23e6f commit b843d4c
Show file tree
Hide file tree
Showing 53 changed files with 1,679 additions and 115 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ Requirements:

**Latest (Desktop):**

- `Mac`: arm64: [fluentci-studio_v0.1.9_arm64.dmg](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.1.9/fluentci-studio_v0.1.9_arm64.dmg) intel: [fluentci-studio_v0.1.9_x64.dmg](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.1.9/fluentci-studio_v0.1.9_x64.dmg)
- `Linux`: [fluentci-studio_v0.1.9.AppImage](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.1.9/fluentci-studio_v0.1.9.AppImage)
- `Mac`: arm64: [fluentci-studio_v0.2.0_arm64.dmg](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.2.0/fluentci-studio_v0.2.0_arm64.dmg) intel: [fluentci-studio_v0.2.0_x64.dmg](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.2.0/fluentci-studio_v0.2.0_x64.dmg)
- `Linux`: [fluentci-studio_v0.2.0.AppImage](https://github.com/fluentci-io/fluentci-studio/releases/download/v0.2.0/fluentci-studio_v0.2.0.AppImage)

**Latest (CLI):**

- `Mac`: arm64: [fluentci_v0.15.9_aarch64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.15.9/fluentci_v0.15.9_aarch64-apple-darwin.tar.gz) intel: [fluentci_v0.15.9_x86_64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.15.9/fluentci_v0.15.9_x86_64-apple-darwin.tar.gz)
- `Linux`: intel: [fluentci_v0.15.9_x86_64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.15.9/fluentci_v0.15.9_x86_64-unknown-linux-gnu.tar.gz) arm64: [fluentci_v0.15.9_aarch64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.15.9/fluentci_v0.15.9_aarch64-unknown-linux-gnu.tar.gz)
- `Mac`: arm64: [fluentci_v0.16.0_aarch64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.16.0/fluentci_v0.16.0_aarch64-apple-darwin.tar.gz) intel: [fluentci_v0.16.0_x86_64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.16.0/fluentci_v0.16.0_x86_64-apple-darwin.tar.gz)
- `Linux`: intel: [fluentci_v0.16.0_x86_64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.16.0/fluentci_v0.16.0_x86_64-unknown-linux-gnu.tar.gz) arm64: [fluentci_v0.16.0_aarch64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci/releases/download/v0.16.0/fluentci_v0.16.0_aarch64-unknown-linux-gnu.tar.gz)

## ✨ Quick Start

Expand All @@ -110,7 +110,7 @@ fluentci studio
fluentci --help

Usage: fluentci [pipeline] [jobs...]
Version: 0.15.9
Version: 0.16.0

Description:

Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"test": {
"exclude": [
".fluentci/"
".fluentci/",
"demo*"
]
}
}
176 changes: 109 additions & 67 deletions deno.lock

Large diffs are not rendered by default.

21 changes: 7 additions & 14 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ export { z } from "https://deno.land/x/[email protected]/mod.ts";
export { decompress } from "https://deno.land/x/[email protected]/mod.ts";
export { existsSync } from "jsr:@std/[email protected]/exists";
export { load } from "jsr:@std/[email protected]";
export { Secret } from "https://deno.land/x/[email protected]/prompt/secret.ts";
export {
Confirm,
Input,
prompt,
} from "https://deno.land/x/[email protected]/prompt/mod.ts";
export { Secret } from "jsr:@cliffy/[email protected]/secret";
export { Confirm, Input, prompt } from "jsr:@cliffy/[email protected]";
import dir from "https://deno.land/x/[email protected]/mod.ts";
export { dir };
export { walk, walkSync } from "jsr:@std/[email protected]/walk";
Expand Down Expand Up @@ -54,19 +50,12 @@ export { dayjs };
import { Buffer } from "npm:buffer";
export { Buffer };
export { mergeReadableStreams } from "jsr:@std/[email protected]";
export {
Cell,
Table,
} from "https://deno.land/x/[email protected]/table/mod.ts";
export { Cell, Table } from "jsr:@cliffy/[email protected]";
export {
TerminalSpinner,
SpinnerTypes,
} from "https://deno.land/x/[email protected]/mod.ts";
export { readAllSync } from "jsr:@std/[email protected]";
import * as toml from "npm:[email protected]";
export { toml };
import tomlify from "npm:[email protected]";
export { tomlify };
export { serve } from "jsr:@std/[email protected]/server";
export { createYoga } from "https://esm.sh/[email protected]?external=graphql";
import SchemaBuilder from "https://esm.sh/*@pothos/[email protected]";
Expand All @@ -87,3 +76,7 @@ export {
export { AzurePipeline } from "jsr:@tsirysndr/[email protected]";
export { BuildSpec } from "jsr:@tsirysndr/[email protected]";
export { ClientError, GraphQLClient, gql } from "npm:[email protected]";
import * as toml from "jsr:@std/toml";
export { toml };
export { assertEquals, assertObjectMatch } from "jsr:@std/assert";
export { EventEmitter } from "jsr:@denosaurs/event";
3 changes: 3 additions & 0 deletions fixtures/android.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[steps]]
command = "fluentci run --wasm android assemble_release"
name = "Run gradle build"
7 changes: 7 additions & 0 deletions fixtures/bazel.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[steps]]
command = "fluentci run --wasm bazel test //..."
name = "Run tests"

[[steps]]
command = "fluentci run --wasm bazel build //..."
name = "Build"
7 changes: 7 additions & 0 deletions fixtures/buck.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[steps]]
command = ["fluentci run --wasm buck test //..."]
name = "Run tests"

[[steps]]
command = ["fluentci run --wasm buck build //..."]
name = "Build"
13 changes: 13 additions & 0 deletions fixtures/cmake.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[steps]]
command = [
"fluentci run --wasm cmake generate",
"fluentci run --wasm make test",
]
name = "Run tests"

[[steps]]
command = [
"fluentci run --wasm cmake generate",
"fluentci run --wasm cmake make",
]
name = "Build"
11 changes: 11 additions & 0 deletions fixtures/cypress.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[steps]]
command = ["fluentci run --wasm bun install"]
name = "Install dependencies"

[[steps]]
command = [
"fluentci run --wasm cypress verify",
"fluentci run --wasm cypress info",
"fluentci run --wasm bun run test:ci",
]
name = "Run e2e tests"
13 changes: 13 additions & 0 deletions fixtures/deno.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[steps]]
command = [
"fluentci run --wasm postgres start",
"fluentci run --wasm deno task test",
]
env = ["POSTGRES_USER=postgres", "POSTGRES_DB=demo"]
name = "Run tests"

[[steps]]
command = [
"fluentci run --wasm deno compile -A --target x86_64-unknown-linux-gnu --output=app main.ts",
]
name = "Compile"
20 changes: 20 additions & 0 deletions fixtures/elixir-phoenix.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[steps]]
command = ["fluentci run --wasm mariadb start"]
env = [
"MARIADB_USER=user",
"MARIADB_PASSWORD=password",
"MARIADB_DATABASE=example_test",
]
name = "Start MariaDB"

[[steps]]
command = [
"fluentci run --wasm elixir test",
"fluentci run --wasm elixir compile",
]
env = [
"MYSQL_DATABASE=example_test",
"MYSQL_USER=root",
"MYSQL_HOST=127.0.0.1",
]
name = "Run tests"
10 changes: 10 additions & 0 deletions fixtures/fastlane.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[steps]]
command = ["fluentci run --wasm android setup"]
name = "Setup Android SDK"

[[steps]]
command = [
"fluentci run --wasm bun install",
"fluentci run --wasm fastlane android buildRelease",
]
name = "Build"
10 changes: 10 additions & 0 deletions fixtures/flutter.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[steps]]
command = [
"fluentci run --wasm flutter code_quality",
"fluentci run --wasm flutter test",
]
name = "Run tests"

[[steps]]
command = ["fluentci run --wasm flutter build apk --release"]
name = "Build"
7 changes: 7 additions & 0 deletions fixtures/gleam.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[steps]]
command = ["fluentci run --wasm gleam test"]
name = "Run tests"

[[steps]]
command = ["fluentci run --wasm gleam build"]
name = "Build"
27 changes: 27 additions & 0 deletions fixtures/go.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[[steps]]
command = ["fluentci run --wasm pkgx install go"]
name = "Setup go"

[[steps]]
command = ["go get", "go build -o ./bin/main"]
name = "go get & build"

[[steps]]
command = ["gofmt main.go | diff --ignore-tab-expansion main.go -"]
name = "Check code style"

[[steps]]
command = [
"fluentci run --wasm postgres start",
"go install gotest.tools/gotestsum@latest",
"PATH=$HOME/go/bin:$PATH gotestsum --junitfile junit.xml ./...",
]
env = ["POSTGRES_USER=postgres", "POSTGRES_DB=s2"]
name = "Run tests"

[[steps]]
command = [
"./bin/main 8001 &",
"curl --silent localhost:8001/time | grep 'The current time is'",
]
name = "Test web server"
28 changes: 28 additions & 0 deletions fixtures/java-spring.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[[steps]]
command = ["fluentci run --wasm java setup zulu-17.46.16"]
name = "Setup Java"

[[steps]]
command = ["fluentci run --wasm maven setup"]
name = "Setup maven"

[[steps]]
command = ["mvn -q package jmeter:configure -Dmaven.test.skip-true"]
env = ["JAVA_HOME=$HOME/.local/share/mise/installs/java/zulu-17.46.16"]
name = "Build"

[[steps]]
command = ["java -version", "mvn -q test-compile -Dmaven.test.skip=true"]
env = ["JAVA_HOME=$HOME/.local/share/mise/installs/java/zulu-17.46.16"]
name = "Run tests"

[[steps]]
command = [
"java -version",
"java -jar target/spring-pipeline-demo.jar > /dev/null &",
"sleep 20",
"mvn -q jmeter:jmeter",
"mvn jmeter:results",
]
env = ["JAVA_HOME=$HOME/.local/share/mise/installs/java/zulu-17.46.16"]
name = "Performance tests"
42 changes: 42 additions & 0 deletions fixtures/javascript.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
authors = ["Tsiry Sandratraina <[email protected]>"]
description = ""
license = "MIT"
name = "fluentci-demo-javascript"
version = "0.1.0"

[[steps]]
command = ["fluentci run --wasm bun run lint"]
name = "Client lint"
working_directory = "src/client"

[[steps]]
command = ["fluentci run --wasm bun run lint"]
name = "Server lint"
working_directory = "src/server"

[[steps]]
command = ["fluentci run --wasm bun run test"]
env = ["CI=true", "NODE_ENV=test"]
name = "Client Unit Tests"
working_directory = "src/client"

[[steps]]
command = ["fluentci run --wasm bun run test"]
env = ["CI=true", "NODE_ENV=test"]
name = "Server Unit Tests"
working_directory = "src/server"

[[steps]]
command = [
"cd src/client && fluentci run --wasm cypress install && cd ../.. && fluentci run --wasm . e2e",
]
name = "End to End Tests"

[[steps]]
command = [
"fluentci run --wasm postgres start",
"pkgx psql ---host=localhost -d postgres -U `whoami` -c 'CREATE DATABASE test;'",
"fluentci run --wasm . server_e2e",
]
name = "End to End Tests (Server)"
7 changes: 7 additions & 0 deletions fixtures/kotlin.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[steps]]
command = ["fluentci run --wasm gradle test"]
name = "test"

[[steps]]
command = ["fluentci run --wasm gradle build"]
name = "build"
17 changes: 17 additions & 0 deletions fixtures/php-laravel.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[steps]]
command = ["fluentci run --wasm mariadb start"]
env = [
"MARIADB_USER=user",
"MARIADB_PASSWORD=password",
"MARIADB_DATABASE=laravel",
]
name = "Start MariaDB"

[[steps]]
command = ["fluentci run --wasm laravel test"]
env = [
"MARIADB_DATABASE=laravel",
"MARIADB_USER=user",
"MARIADB_PASSWORD=password",
]
name = "Run tests"
6 changes: 6 additions & 0 deletions fixtures/php.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[steps]]
command = [
"fluentci run --wasm php composer_install --no-interaction",
"fluentci run --wasm php test",
]
name = "Run tests"
11 changes: 11 additions & 0 deletions fixtures/playwright.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[steps]]
command = ["fluentci run --wasm bun install"]
name = "Install dependencies"

[[steps]]
command = [
"fluentci run --wasm playwright install --with-deps",
"fluentci run --wasm playwright test -j $(nproc)",
]
env = ["CI=true"]
name = "Run playwright tests"
20 changes: 20 additions & 0 deletions fixtures/python-django.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

[[steps]]
command = ["fluentci run --wasm mariadb start"]
env = [
"MARIADB_DATABSE=todo",
"MARIADB_USER=user",
"MARIADB_PASSWORD=testrootpass",
]
name = "Start MariaDB"

[[steps]]
command = ["fluentci run --wasm django test"]
env = [
"MARIADB_DATABSE=todo",
"MARIADB_USER=user",
"MARIADB_PASSWORD=testrootpass",
"MARIADB_ROOT_PASSWORD=root",
"MARIADB_HOST=127.0.0.1",
]
name = "Run tests"
14 changes: 14 additions & 0 deletions fixtures/python-flask.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

[[steps]]
command = ["fluentci run --wasm mongo start"]
name = "Start MongoDB"

[[steps]]
command = [
"fluentci run --wasm devbox run pip install -r requirements.txt",
"fluentci run --wasm devbox run python run.py &",
"sleep 2",
"fluentci run --wasm devbox run python -m unittest",
]
env = ["DB=mongodb://localhost:27017/tasks", "PORT=5000"]
name = "Run tests"
8 changes: 8 additions & 0 deletions fixtures/react-native.fluentci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[steps]]
command = ["fluentci run --wasm bun install"]
name = "Install dependencies"

[[steps]]
command = ["fluentci run --wasm android assemble_release"]
name = "Run gradle assemble"
working_directory = "android"
Loading

0 comments on commit b843d4c

Please sign in to comment.