Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
537aa1903e | |||
f70e52dcc9 | |||
a304692ecb | |||
eeca7c5026 | |||
dfbcd2aee1 | |||
4421331437 | |||
5e6c1bb9e2 | |||
44eba43bae | |||
358a5e374f | |||
b9c65a53a1 | |||
9620ff9416 | |||
f973c7630e | |||
ac76264da2 | |||
b6b896c763 | |||
6d7c5c3914 | |||
df2c66cf29 | |||
f9d718302d | |||
c3ef0c3702 | |||
e498e7736a | |||
e1674c1af9 | |||
f233bcb89a | |||
4b237a63e5 | |||
af9f6d8b8e | |||
fb6358de51 | |||
226c5fce6f | |||
009d23987c | |||
6f887e018c | |||
5af63786ee | |||
128458b745 | |||
ca6bec4c75 | |||
042a8136fa | |||
827c06dc36 | |||
0105abc295 | |||
eb940f762b | |||
f9482e011a | |||
1e52a5d65c | |||
2a74a2a5c4 | |||
6ab5ae85b2 | |||
024aa36e22 | |||
f6cb2006aa |
6
.github/workflows/codeql.yaml
vendored
6
.github/workflows/codeql.yaml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
# Must fetch at least the immediate parents so that if this is
|
# Must fetch at least the immediate parents so that if this is
|
||||||
# a pull request then we can checkout the head of the pull request.
|
# a pull request then we can checkout the head of the pull request.
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
with:
|
with:
|
||||||
language: 'javascript'
|
language: 'javascript'
|
||||||
@ -41,4 +41,4 @@ jobs:
|
|||||||
npm run all
|
npm run all
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
build: # make sure build/ci work properly
|
build: # make sure build/ci work properly
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- run: |
|
- run: |
|
||||||
npm install
|
npm install
|
||||||
npm run all
|
npm run all
|
||||||
@ -52,8 +52,8 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v3
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
@ -72,8 +72,8 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v3
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
working-directory: sample-go-mod
|
working-directory: sample-go-mod
|
||||||
|
20
README.md
20
README.md
@ -9,7 +9,7 @@ The action runs [golangci-lint](https://github.com/golangci/golangci-lint) and r
|
|||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
* `v3.0.0+` requires explicit setup-go installation step prior to using this action: `uses: actions/setup-go@v2`.
|
* `v3.0.0+` requires explicit setup-go installation step prior to using this action: `uses: actions/setup-go@v3`.
|
||||||
The `skip-go-installation` option has been removed.
|
The `skip-go-installation` option has been removed.
|
||||||
* `v2.0.0+` works with `golangci-lint` version >= `v1.28.3`
|
* `v2.0.0+` works with `golangci-lint` version >= `v1.28.3`
|
||||||
* `v1.2.2` is deprecated due to we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
|
* `v1.2.2` is deprecated due to we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
|
||||||
@ -38,10 +38,12 @@ jobs:
|
|||||||
name: lint
|
name: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v3
|
||||||
- uses: actions/checkout@v2
|
with:
|
||||||
|
go-version: 1.17
|
||||||
|
- uses: actions/checkout@v3
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
# 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.29
|
version: v1.29
|
||||||
@ -91,15 +93,17 @@ jobs:
|
|||||||
golangci:
|
golangci:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.15.x]
|
go: [1.17]
|
||||||
os: [macos-latest, windows-latest]
|
os: [macos-latest, windows-latest]
|
||||||
name: lint
|
name: lint
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v3
|
||||||
- uses: actions/checkout@v2
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
- uses: actions/checkout@v3
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||||
version: v1.29
|
version: v1.29
|
||||||
|
3336
dist/post_run/index.js
vendored
3336
dist/post_run/index.js
vendored
File diff suppressed because one or more lines are too long
3336
dist/run/index.js
vendored
3336
dist/run/index.js
vendored
File diff suppressed because one or more lines are too long
1139
package-lock.json
generated
1139
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@ -24,25 +24,25 @@
|
|||||||
"author": "golangci",
|
"author": "golangci",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^1.0.9",
|
"@actions/cache": "^2.0.2",
|
||||||
"@actions/core": "^1.6.0",
|
"@actions/core": "^1.8.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^5.0.0",
|
"@actions/github": "^5.0.1",
|
||||||
"@actions/tool-cache": "^1.7.1",
|
"@actions/tool-cache": "^1.7.2",
|
||||||
"@types/semver": "^7.3.9",
|
"@types/semver": "^7.3.9",
|
||||||
"@types/tmp": "^0.2.3",
|
"@types/tmp": "^0.2.3",
|
||||||
"tmp": "^0.2.1"
|
"tmp": "^0.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.12.1",
|
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
||||||
"@typescript-eslint/parser": "^5.12.1",
|
"@typescript-eslint/parser": "^5.22.0",
|
||||||
"@vercel/ncc": "^0.33.3",
|
"@vercel/ncc": "^0.33.4",
|
||||||
"eslint": "^8.10.0",
|
"eslint": "^8.15.0",
|
||||||
"eslint-config-prettier": "^8.4.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.6.2",
|
||||||
"typescript": "^4.5.5"
|
"typescript": "^4.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,12 +52,9 @@ const getIntervalKey = (invalidationIntervalDays: number): string => {
|
|||||||
|
|
||||||
async function buildCacheKeys(): Promise<string[]> {
|
async function buildCacheKeys(): Promise<string[]> {
|
||||||
const keys = []
|
const keys = []
|
||||||
let cacheKey = `golangci-lint.cache-`
|
|
||||||
keys.push(cacheKey)
|
|
||||||
|
|
||||||
// Periodically invalidate a cache because a new code being added.
|
// Periodically invalidate a cache because a new code being added.
|
||||||
// TODO: configure it via inputs.
|
// TODO: configure it via inputs.
|
||||||
cacheKey += `${getIntervalKey(7)}-`
|
let cacheKey = `golangci-lint.cache-${getIntervalKey(7)}-`
|
||||||
keys.push(cacheKey)
|
keys.push(cacheKey)
|
||||||
|
|
||||||
if (await pathExists(`go.mod`)) {
|
if (await pathExists(`go.mod`)) {
|
||||||
|
Reference in New Issue
Block a user