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} Clean up golangci job #602

Merged
merged 1 commit into from
Nov 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 14 additions & 27 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,24 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
name: Lint
runs-on: macos-latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmaloney may I ask why did you changed it to mac? Imo Ubuntu is faster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see that speed matter much here since the main build takes over 10 minutes (and I didn't notice much difference), but the Linux one was running an update and pulling down a bunch of packages. This is a waste of bandwidth and also means that it needs to be kept up-to-date if the required packages change.

Less required maintenance is good!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right! Looks fair to me, thank you

steps:
- uses: actions/setup-go@v3
- name: Check out source code
uses: actions/checkout@v3

- name: Setup
uses: actions/setup-go@v3
with:
go-version: '1.18.x'
- name: Set up LibGL, Mesa & X11 libraries
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y libgtk-3-dev libasound2-dev libxxf86vm-dev
- uses: actions/checkout@v3
- name: golangci-lint
go-version-file: 'go.mod'
cache: true

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.50.1

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.

# skip-build-cache: true