Maybe 3rd time is the charm!
This makes the CI build run on windows too, and fix broken tests/featuers on Windows.
Most of the changes are related to ignoring certain tests on windows, or making sure to use the right path separators.
More work to do in the future, probably!
#4293
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
## 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>
A test failed as I didn't had upx installed:
```
--- FAIL: TestRun (0.58s)
upx_test.go:119:
Error Trace: /home/cipri/git/goreleaser/internal/pipe/upx/upx_test.go:119
Error: Received unexpected error:
upx not found in PATH
Test: TestRun
FAIL
```
<!-- If applied, this commit will... -->
...
<!-- Why is this change being made? -->
...
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
...
<!--
Hi, thanks for contributing!
Please make sure you read our CONTRIBUTING guide.
Also, add tests and the respective documentation changes as well.
-->
<!-- If applied, this commit will... -->
This PR fixes the links to Go and Task installation pages.
<!-- Why is this change being made? -->
Official go site is now https://go.dev where the old link was
automatically redicting.
Task's website has been changed and the installation procedure is now on
its own page.
<!-- # Provide links to any relevant tickets, URLs or other resources
-->
update everything to go 1.20
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat(ci): compile with go 1.19
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fixing template test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: improve check
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: more test and docs fixes
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: fix
* test: fix
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* test: docker templates
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: godoc for RequireTemplateError
* chore: code of conduct links
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* docs: use the orgs code of conduct
we dont need to keep a copy of it in every project, a single one should do.
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: use go 1.17
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: go mod tidy
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix failing test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* ci: increase lint timeout
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* ci: increase lint timeout
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: lint on specific ci step
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: run on push
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: contributing
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: contributing
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: action
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: support apple silicon
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: go 1.16
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: go 1.16
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: go 1.16
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test case
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* Update .github/workflows/build.yml
Co-authored-by: Radek Simko <radek.simko@gmail.com>
* docs: go 1.16
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Radek Simko <radek.simko@gmail.com>
* Update to Go 1.15 image (#1758)
* feat: use go 1.15
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: remove darwin_386
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Simon Jürgensmeyer <sj14@users.noreply.github.com>
* feat: upgrade to go 1.14
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
thanks @djgilcrease for all the hard work on nfpm
and google/rpmpack.
thanks to @jarondl who works on rpmpack as well.
great work everyone! 🚀
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
- fpm is required to pass tests.
- apex/log package needs to be available.
- gpgSign git option needs to be disabled for test repo.
This is an issue when a developer has set gpgSign to true in
their global .gitconfig file.