mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-06-19 05:55:04 +08:00
chore(ci): clean workflows.
This commit is contained in:
parent
ca8d28f913
commit
f21730e879
18
.github/workflows/golint.yml
vendored
18
.github/workflows/golint.yml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: Lint
|
name: Lint
|
||||||
|
|
||||||
on: [push,workflow_dispatch]
|
on: [push,pull_request,workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
golangci:
|
golangci:
|
||||||
@ -18,21 +18,13 @@ jobs:
|
|||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
- name: Cache downloaded module
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
|
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
go test $(go list ./...)
|
go test $(go list ./...)
|
||||||
|
|
||||||
- name: Commit back
|
- name: Commit back
|
||||||
if: github.repository_owner == 'Mrs4s'
|
if: ${{ github.repository_owner == 'Mrs4s' && github.event.push }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
git config --local user.name 'github-actions[bot]'
|
git config --local user.name 'github-actions[bot]'
|
||||||
@ -40,3 +32,9 @@ jobs:
|
|||||||
git add --all
|
git add --all
|
||||||
git commit -m "ci(chore): Fix stylings"
|
git commit -m "ci(chore): Fix stylings"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
- name: Suggester
|
||||||
|
if: ${{ github.event.pull_request }}
|
||||||
|
uses: reviewdog/action-suggester@v1
|
||||||
|
with:
|
||||||
|
tool_name: golangci-lint
|
||||||
|
37
.github/workflows/suggester.yml
vendored
37
.github/workflows/suggester.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
golangci:
|
|
||||||
name: lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Go environment
|
|
||||||
uses: actions/setup-go@v2.1.3
|
|
||||||
with:
|
|
||||||
go-version: 1.16
|
|
||||||
|
|
||||||
- name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Cache downloaded module
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ matrix.goos }}-${{ matrix.goarch }}-${{ hashFiles('**/go.sum') }}
|
|
||||||
|
|
||||||
- name: Tests
|
|
||||||
run: |
|
|
||||||
go test $(go list ./...)
|
|
||||||
|
|
||||||
- name: Suggester
|
|
||||||
uses: reviewdog/action-suggester@v1
|
|
||||||
with:
|
|
||||||
tool_name: golangci-lint
|
|
Loading…
x
Reference in New Issue
Block a user