Skip to content

Commit

Permalink
Merge pull request #6 from fluent-ci-templates/zenith
Browse files Browse the repository at this point in the history
Make it compatible with Dagger Zenith
  • Loading branch information
tsirysndr authored Oct 21, 2023
2 parents 01c8236 + c81b042 commit bc66962
Show file tree
Hide file tree
Showing 13 changed files with 345 additions and 78 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,16 @@ fluentci run codecov_pipeline
|---------|----------------------------------|
| upload | Uploads coverage to Codecov. |

```graphql
upload(src: String!, token: String!): String
```

## Programmatic usage

You can also use this pipeline programmatically:

```typescript
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import { upload } from "https://deno.land/x/codecov_pipeline/mod.ts";

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

pipeline();

await upload();
```
9 changes: 1 addition & 8 deletions ci.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import Client, { connect } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
import { upload } from "https://deno.land/x/codecov_pipeline/mod.ts";

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

pipeline();
await upload();
5 changes: 5 additions & 0 deletions dagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"root": "",
"name": "codecov",
"sdkRuntime": "tsiry/dagger-sdk-deno"
}
4 changes: 3 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"tasks": {
"esm:add": "deno run -A https://esm.sh/v128 add",
"esm:update": "deno run -A https://esm.sh/v128 update",
"esm:remove": "deno run -A https://esm.sh/v128 remove"
"esm:remove": "deno run -A https://esm.sh/v128 remove",
"schema": "deno run -A src/dagger/schema.ts",
"clean": "rm -rf gen schema.graphql"
}
}
78 changes: 76 additions & 2 deletions deno.lock

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

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

export { connect, uploadContext } from "https://sdk.fluentci.io/v0.1.9/mod.ts";
export { connect, uploadContext } from "https://sdk.fluentci.io/z1/mod.ts";
export { brightGreen } from "https://deno.land/std@0.191.0/fmt/colors.ts";
export { withDevbox } from "https://nix.fluentci.io/v0.5.1/src/dagger/steps.ts";
export { withDevbox } from "https://nix.fluentci.io/zenith/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 };
export {
arg,
queryType,
stringArg,
intArg,
nonNull,
makeSchema,
} from "npm:nexus";
export {
dirname,
join,
resolve,
} from "https://deno.land/std@0.203.0/path/mod.ts";

export * as FluentGitlabCI from "https://deno.land/x/fluent_gitlab_ci@v0.4.2/mod.ts";
export * as FluentGithubActions from "https://deno.land/x/fluent_github_actions@v0.2.1/mod.ts";
Expand Down
135 changes: 135 additions & 0 deletions gen/nexus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/**
* This file was generated by Nexus Schema
* Do not make changes to this file directly
*/







declare global {
interface NexusGen extends NexusGenTypes {}
}

export interface NexusGenInputs {
}

export interface NexusGenEnums {
}

export interface NexusGenScalars {
String: string
Int: number
Float: number
Boolean: boolean
ID: string
}

export interface NexusGenObjects {
Query: {};
}

export interface NexusGenInterfaces {
}

export interface NexusGenUnions {
}

export type NexusGenRootTypes = NexusGenObjects

export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars

export interface NexusGenFieldTypes {
Query: { // field return type
upload: string | null; // String
}
}

export interface NexusGenFieldTypeNames {
Query: { // field return type name
upload: 'String'
}
}

export interface NexusGenArgTypes {
Query: {
upload: { // args
src: string; // String!
token: string; // String!
}
}
}

export interface NexusGenAbstractTypeMembers {
}

export interface NexusGenTypeInterfaces {
}

export type NexusGenObjectNames = keyof NexusGenObjects;

export type NexusGenInputNames = never;

export type NexusGenEnumNames = never;

export type NexusGenInterfaceNames = never;

export type NexusGenScalarNames = keyof NexusGenScalars;

export type NexusGenUnionNames = never;

export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never;

export type NexusGenAbstractsUsingStrategyResolveType = never;

export type NexusGenFeaturesConfig = {
abstractTypeStrategies: {
isTypeOf: false
resolveType: true
__typename: false
}
}

export interface NexusGenTypes {
context: any;
inputTypes: NexusGenInputs;
rootTypes: NexusGenRootTypes;
inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars;
argTypes: NexusGenArgTypes;
fieldTypes: NexusGenFieldTypes;
fieldTypeNames: NexusGenFieldTypeNames;
allTypes: NexusGenAllTypes;
typeInterfaces: NexusGenTypeInterfaces;
objectNames: NexusGenObjectNames;
inputNames: NexusGenInputNames;
enumNames: NexusGenEnumNames;
interfaceNames: NexusGenInterfaceNames;
scalarNames: NexusGenScalarNames;
unionNames: NexusGenUnionNames;
allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames'];
allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames'];
allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes']
abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames'];
abstractTypeMembers: NexusGenAbstractTypeMembers;
objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf;
abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType;
features: NexusGenFeaturesConfig;
}


declare global {
interface NexusGenPluginTypeConfig<TypeName extends string> {
}
interface NexusGenPluginInputTypeConfig<TypeName extends string> {
}
interface NexusGenPluginFieldConfig<TypeName extends string, FieldName extends string> {
}
interface NexusGenPluginInputFieldConfig<TypeName extends string, FieldName extends string> {
}
interface NexusGenPluginSchemaConfig {
}
interface NexusGenPluginArgConfig {
}
}
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from "./src/dagger/index.ts";
export * as queries from "./src/dagger/queries.ts";
export { schema } from "./src/dagger/schema.ts";
7 changes: 7 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### This file was generated by Nexus Schema
### Do not make changes to this file directly


type Query {
upload(src: String!, token: String!): String
}
Loading

0 comments on commit bc66962

Please sign in to comment.