Skip to content
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

.github: Update ci && lint #69

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,18 @@ name: ci
on:
push:
branches:
- 'master'
- "master"
pull_request:

jobs:
test:
name: Run Tests
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.21.x
- name: Checkout
uses: actions/checkout@v3
- name: Cache Modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-v1-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: go test -v ./...
uses: upfluence/private-actions/.github/workflows/lib-go-test.yml@master
secrets: inherit
with:
go-version-matrix: "['1.20.x', '1.21.x', '1.23.x']"

release:
needs: test
if: github.ref == 'refs/heads/master'
uses: upfluence/actions/.github/workflows/lib-any-release.yml@master
secrets: inherit
18 changes: 3 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
name: linter
name: reviewdog
on: [pull_request]

jobs:
lint:
name: runner / golangci-lint
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Checkout
uses: actions/checkout@v3
- name: golanci-lint
uses: upfluence/action-golangci-lint@master
with:
github_token: ${{ secrets.github_token }}
uses: upfluence/private-actions/.github/workflows/any-go-lint.yml@master
secrets: inherit