1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00
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
2024-09-07 11:09:21 -03:00
2024-09-12 16:44:44 -03:00
2024-07-17 10:56:36 -03:00
2024-09-17 17:43:41 +00:00
2024-01-24 08:00:52 -03:00
2023-12-28 20:49:23 -03:00
2023-05-25 23:07:10 -03:00
2024-08-03 14:30:10 -03:00
2024-08-18 16:08:55 -03:00
2022-08-21 15:36:37 -03:00
2022-10-31 16:06:50 -03:00
2023-04-30 14:19:55 -03:00
2024-09-17 17:43:41 +00:00
2024-09-03 19:57:29 -03:00
2024-09-16 21:40:10 -03:00
2024-09-16 21:40:10 -03:00
2022-02-08 14:21:36 -03:00
2024-05-26 15:02:57 -03:00
2024-08-05 09:38:49 -03:00
2023-10-02 18:04:20 +00:00
2024-07-10 00:03:07 -03:00
2024-08-06 00:04:11 -03:00

GoReleaser Logo

GoReleaser

Deliver Go binaries as fast and easily as possible.


GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.


Get GoReleaser

Documentation

Documentation is hosted live at https://goreleaser.com

Community

You have questions, need support and or just want to talk about GoReleaser?

Here are ways to get in touch with the GoReleaser community:

Join Discord Follow Twitter GitHub Discussions

You can find the links above and all others here.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. We appreciate your contribution. Please refer to our contributing guidelines for further information.

Badges

Release Software License Build status Codecov branch Artifact Hub Go Doc Powered By: GoReleaser Backers on Open Collective Sponsors on Open Collective Conventional Commits CII Best Practices

GitHub Sponsors

High-tier sponsors of @caarlos0 on GitHub:

OpenCollective

Sponsors

Does your company use goreleaser? Help keep the project bug-free and feature rich by sponsoring the project.

Backers

Love our work and community? Become a backer.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Stargazers over time

Stargazers over time

Languages
Go 93.4%
Nix 2.1%
Ruby 2%
YAML 1%
HTML 0.6%
Other 0.9%