-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
154 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
groups: | ||
artifacts: | ||
patterns: | ||
- "actions/*-artifact" |
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,57 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/lint.yml' | ||
- '.golangci.yml' | ||
- '**.go' | ||
- 'go.*' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/lint.yml' | ||
- '.golangci.yml' | ||
- '**.go' | ||
- 'go.*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: golang | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: latest | ||
args: --timeout=2m0s | ||
skip-cache: true | ||
|
||
dependencies: | ||
name: dependencies | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "stable" | ||
|
||
- name: Check minimum supported version of Go | ||
run: | | ||
go mod tidy -go=1.21 -compat=1.21 | ||
- name: Check go.mod / go.sum | ||
run: | | ||
git add go.* | ||
git diff --cached --exit-code go.* |
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,42 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/test.yml' | ||
- '**.go' | ||
- 'go.*' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/test.yml' | ||
- '**.go' | ||
- 'go.*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
go: | ||
strategy: | ||
matrix: | ||
go-version: | ||
- "1.21" | ||
- "1.22" | ||
- "1.23" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
apt-get -y update | ||
apt-get -y install libheif-dev | ||
- name: Run tests | ||
run: | | ||
go test -v ./... |
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,40 @@ | ||
linters: | ||
enable: | ||
- gofmt | ||
- revive | ||
|
||
linters-settings: | ||
revive: | ||
ignoreGeneratedHeader: true | ||
severity: warning | ||
rules: | ||
- name: blank-imports | ||
- name: context-as-argument | ||
- name: context-keys-type | ||
- name: dot-imports | ||
- name: error-return | ||
#- name: error-strings | ||
- name: error-naming | ||
- name: exported | ||
- name: if-return | ||
- name: increment-decrement | ||
#- name: var-naming | ||
- name: var-declaration | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: time-naming | ||
- name: unexported-return | ||
#- name: indent-error-flow | ||
- name: errorf | ||
- name: empty-block | ||
- name: superfluous-else | ||
#- name: unused-parameter | ||
- name: unreachable-code | ||
- name: redefines-builtin-id | ||
|
||
issues: | ||
exclude-rules: | ||
- path: \.gen\.go | ||
linters: | ||
- gofmt |