1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-06-19 14:05:03 +08:00

chore(ci): clean workflows.

This commit is contained in:
wdvxdr 2021-07-10 23:47:17 +08:00
parent ca8d28f913
commit f21730e879
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
2 changed files with 8 additions and 47 deletions

View File

@ -1,6 +1,6 @@
name: Lint name: Lint
on: [push,workflow_dispatch] on: [push,pull_request,workflow_dispatch]
jobs: jobs:
golangci: golangci:
@ -19,20 +19,12 @@ jobs:
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

View File

@ -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