1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00
goreleaser/dagger/go.mod
Kyle Penfound d594cdd436
ci: daggerize test pipeline (#4969)
## What is this?

This daggerizes the lint, test, and build pipelines for Goreleaser.

## Why?

For context, the previous pass at this can be found here
https://github.com/goreleaser/goreleaser/pull/4186 . Since that time,
the DX for using Dagger has been considerably improved.

The benefit this brings to the Goreleaser project is that the test
pipeline can be run locally the same as it is run in CI without
requiring contributors to configure additional tools in their developer
environments. Additionally, by codifying the test and build execution
environments, you no longer need to be concerned with changing or
outdated Github Actions runner environments.


## How?

As a contributor, you can simply clone/fork Goreleaser and run:


`dagger functions` to see which commands are available.

To lint local code:

`dagger call --source . lint`

To run tests against local code:

`dagger call --source . test output`

To run tests against local code and get the coverage report:

`dagger call --source . test coverage-report -o ./coverage.txt`

To run tests on the main branch on Github:

`dagger call --source=https://github.com/goreleaser/goreleaser test
output`

To run tests against a PR branch on Github:

`dagger call
--source=https://github.com/goreleaser/goreleaser#pull/4958/head test
output`

To run tests against a PR branch using the dagger pipeline committed to
the main branch, without checking out goreleaser:

`dagger -m github.com/goreleaser/goreleaser call
--source=https://github.com/goreleaser/goreleaser#pull/4958/head test
output`

And so on 😃 

## Also

In addition to the Dagger code, I've updated the build.yml workflow to
use the test pipeline and updated CONTRIBUTING.md with the command to
run tests with Dagger.
Note that I did not update the Taskfile.yml to avoid breaking anything
for contributors comfortable with their existing workflows.

Do you feel that this will benefit the Goreleaser project? Would you
like to see the Dagger functions doing more/less?

---------

Signed-off-by: kpenfound <kyle@dagger.io>
Signed-off-by: Lev Lazinskiy <lev@levlaz.org>
Signed-off-by: Lev Lazinskiy <lev@dagger.io>
Co-authored-by: Lev Lazinskiy <lev@levlaz.org>
Co-authored-by: Lev Lazinskiy <lev@dagger.io>
2024-09-19 23:21:59 -03:00

49 lines
2.1 KiB
Modula-2

module github.com/goreleaser/goreleaser/dagger
go 1.22.1
require (
github.com/99designs/gqlgen v0.17.49
github.com/Khan/genqlient v0.7.0
github.com/vektah/gqlparser/v2 v2.5.16
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0
go.opentelemetry.io/otel/sdk v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/sync v0.7.0
google.golang.org/grpc v1.65.0
)
require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sosodev/duration v1.3.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240801193407-d7372079a809
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/log v0.4.0
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.4.0
go.opentelemetry.io/proto/otlp v1.3.1
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/protobuf v1.34.2 // indirect
)
replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.0.0-20240518090000-14441aefdf88
replace go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp => go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.3.0
replace go.opentelemetry.io/otel/log => go.opentelemetry.io/otel/log v0.3.0
replace go.opentelemetry.io/otel/sdk/log => go.opentelemetry.io/otel/sdk/log v0.3.0