v0.1.2
A ready-to-use CI/CD Pipeline for Go projects.
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Go Pipeline
A ready-to-use GitLab CI Pipeline and Jobs for your Go projects.
🚀 Usage
Quick start:
import { GitLab } from "https://deno.land/x/go_pipeline/mod.ts";
const { pipeline } = GitLab;
pipeline.write(); // Write the pipeline to the file .gitlab-ci.ymlOr, if you want to use the predefined jobs:
import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts";
import { GitLab } from "https://deno.land/x/go_pipeline/mod.ts";
const { build, test, fmt } = GitLab;
const const pipeline = new GitlabCI()
.image("golang:latest")
.addJob("fmt", fmt)
.addJob("test", test)
.addJob("build", build);
pipeline.write(); // Write the pipeline to the file .gitlab-ci.ymlIt will generate the following .gitlab-ci.yml file:
# Do not edit this file directly. It is generated by Fluent GitLab CI
image: golang:latest
fmt:
script:
- go fmt ./...
test:
script:
- go test -v ./...
build:
script:
- go build🧪 Advanced Usage
This package also provides a ready-to-use pipeline for Dagger:
import Client, { connect } from "@dagger.io/dagger";
import { Dagger } from "https://deno.land/x/go_pipeline/mod.ts";
const { build, test, fmt } = Dagger;
function pipeline(src = ".") {
connect(async (client: Client) => {
await fmt(client, src);
await test(client, src);
await build(client, src);
});
}
pipeline();