Skip to content

GitHub actions running go fmt check on a Windows machine complains about file format endings #259

Closed
@alexander-ding

Description

@alexander-ding

What happened:
As discussed in this PR, the automatic GitHub action for Windows unit tests is running on a Windows machine, where gofmt expects \n\r line endings in files. However, the files checked in in this repository use Linux style \n line endings, which causes gofmt to complain. This doesn't show up in local Linux development machines and have been silent as GitHub actions only care about the return code of the final command in a multi-line run command. The gofmt check is only the first line, so the error is logged but doesn't fail the entire action.

What you expected to happen:
The gofmt check, as well as other Makefile checks, should happen on a Linux machine. The actual unit tests can happen in its own separate task.

How to reproduce it:
Any pull request onto master should trigger the workflow. Check the log for the unit tests.

Anything else we need to know?:

Environment:
Not relevant.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions