-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add linter to CI #24
Merged
Merged
Add linter to CI #24
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question | ||
- name: Ask a question | ||
url: https://github.com/runfinch/finch-daemon/discussions | ||
about: Use GitHub Discussions to ask questions, discuss options, or propose new ideas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "ci" | ||
include: "scope" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "ci" | ||
include: "scope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,86 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
workflow_dispatch: | ||
env: | ||
GO_VERSION: '1.22.6' | ||
|
||
GO_VERSION: '1.23.0' | ||
GOLANGCI_LINT_VERSION: '1.60.3' | ||
jobs: | ||
git-secrets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull latest awslabs/git-secrets repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
repository: awslabs/git-secrets | ||
ref: 1.3.0 | ||
fetch-tags: true | ||
path: git-secrets | ||
- name: Install git secrets from source | ||
run: sudo make install | ||
working-directory: git-secrets | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Scan repository for git secrets | ||
run: | | ||
git secrets --register-aws | ||
git secrets --scan-history | ||
unit-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: false | ||
- name: Checkout finch-deamon repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Build and run unit tests | ||
run: | | ||
make build | ||
make run-unit-tests | ||
e2e-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Checkout finch-daemon repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Install Dependencies for e2e Testing | ||
run: ./setup-test-env.sh | ||
- name: Build the daemon | ||
run: make build | ||
- name: Remove default podman network config | ||
run: | | ||
sudo ls /etc/cni/net.d | ||
sudo rm /etc/cni/net.d/87-podman-bridge.conflist | ||
- name: Start finch-daemon | ||
run: sudo bin/finch-daemon --debug --socket-owner $UID & | ||
- name: Run e2e test | ||
run: sudo make run-e2e-tests | ||
git-secrets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Pull latest awslabs/git-secrets repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
repository: awslabs/git-secrets | ||
ref: 1.3.0 | ||
fetch-tags: true | ||
path: git-secrets | ||
- name: Install git secrets from source | ||
run: sudo make install | ||
working-directory: git-secrets | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Scan repository for git secrets | ||
run: | | ||
git secrets --register-aws | ||
git secrets --scan-history | ||
lint: | ||
strategy: | ||
matrix: | ||
working_dir: ['.'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: golangci/golangci-lint-action@v6 # v6.1.0 | ||
with: | ||
version: v${{ env.GOLANGCI_LINT_VERSION }} | ||
working-directory: ${{ matrix.working_dir }} | ||
args: --fix=false --timeout=5m | ||
yamllint: | ||
name: yamllint-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- run: yamllint . | ||
unit-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: false | ||
- name: Checkout finch-deamon repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Build and run unit tests | ||
run: | | ||
make build | ||
make run-unit-tests | ||
e2e-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Checkout finch-daemon repo | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Install Dependencies for e2e Testing | ||
run: ./setup-test-env.sh | ||
- name: Build the daemon | ||
run: make build | ||
- name: Remove default podman network config | ||
run: | | ||
sudo ls /etc/cni/net.d | ||
sudo rm /etc/cni/net.d/87-podman-bridge.conflist | ||
- name: Start finch-daemon | ||
run: sudo bin/finch-daemon --debug --socket-owner $UID & | ||
- name: Run e2e test | ||
run: sudo make run-e2e-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends: default | ||
rules: | ||
trailing-spaces: | ||
# issue templates intentionally have some whitespace | ||
ignore: .github/ISSUE_TEMPLATE/ | ||
document-start: disable # preference, can enable if desired | ||
comments: disable # doesn't like in-line comments like this | ||
line-length: disable # hard to enforce <80 chars for some cmds | ||
truthy: | ||
allowed-values: ['true', 'false', 'on'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a new line.. line number is still 150
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean you're missing the newline character at the end of file. See the red marker here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shoot, My bad. Will add this back in the next commit.