Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: run mage with "-v" to not discard output, and move mage to a submodule #1238

Merged
merged 2 commits into from Feb 19, 2021

Conversation

@thaJeztah
Copy link
Collaborator

@thaJeztah thaJeztah commented Feb 19, 2021

travis: run mage with -v to not discard output

Before this:

$ go run mage.go lint
Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
exit status 1

$ go run mage.go test
Error: running "go test -race -v ./..." failed with exit code 1
exit status 1

After this:

$ go run mage.go -v lint
Running target: Lint
exec: /Users/sebastiaan/go/bin/golangci-lint run ./...
entry.go:89:6: `iamNotUsed` is unused (deadcode)
func iamNotUsed() {
     ^
Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
exit status 1

$ go run mage.go -v test
Running target: Test
exec: go test -race -v ./...
=== RUN   TestRegister
...
?   	github.com/sirupsen/logrus/internal/testutils	[no test files]
FAIL
Error: running "go test -race -v ./..." failed with exit code 1
exit status 1

move "mage" to a separate module

Move the magefile related files to a submodule, so that it does not become a dependency for logrus itself.

thaJeztah added 2 commits Feb 19, 2021
Before this:

    $ go run mage.go lint
    Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
    exit status 1

    $ go run mage.go test
    Error: running "go test -race -v ./..." failed with exit code 1
    exit status 1

After this:

    $ go run mage.go -v lint
    Running target: Lint
    exec: /Users/sebastiaan/go/bin/golangci-lint run ./...
    entry.go:89:6: `iamNotUsed` is unused (deadcode)
    func iamNotUsed() {
         ^
    Error: running "/Users/sebastiaan/go/bin/golangci-lint run ./..." failed with exit code 1
    exit status 1

    $ go run mage.go -v test
    Running target: Test
    exec: go test -race -v ./...
    === RUN   TestRegister
    ...
    ?   	github.com/sirupsen/logrus/internal/testutils	[no test files]
    FAIL
    Error: running "go test -race -v ./..." failed with exit code 1
    exit status 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Move the magefile related files to a submodule, so that it
does not become a dependency for logrus itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah marked this pull request as ready for review Feb 19, 2021
@thaJeztah
Copy link
Collaborator Author

@thaJeztah thaJeztah commented Feb 19, 2021

@dgsb PTAL

Wondering; perhaps we should move to GitHub actions, now that travis-ci.org is shutting down (and there's ready-made actions for Golang and Golang-ci-lint). Looking at the magefile, it's only doing some minimal things, which could be handled by some standard GH actions.

(I'll try to prepare a PR for that for consideration)

Loading

@dgsb
Copy link
Collaborator

@dgsb dgsb commented Feb 19, 2021

@thaJeztah thanks, that's a clever trick.

Regarding github action I'd rather not move things out from the magefile, the purpose is to get independant as much as possible from the CI system whatever it is so that any migration when needed is seamless.

Loading

@dgsb dgsb merged commit f104497 into sirupsen:master Feb 19, 2021
2 checks passed
Loading
@thaJeztah thaJeztah deleted the move_mage branch Feb 19, 2021
@thaJeztah
Copy link
Collaborator Author

@thaJeztah thaJeztah commented Feb 19, 2021

Regarding github action I'd rather not move things out from the magefile, the purpose is to get independant as much as possible from the CI system whatever it is so that any migration when needed is seamless.

Got distracted by other pull requests I was working on, but I opened #1239 to look at / discuss what GH Actions could look like 🤗

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants