Skip to content

Commit

Permalink
style: simple code
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jin-gou committed Mar 3, 2024
1 parent 7628224 commit 06f235d
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 2,577 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,17 @@ jobs:
# Set staticcheck flags
staticcheck_flags: -checks=inherit,-SA1029

resolve-modules:
name: resolve module
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- id: set-matrix
run: ./hack/resolve-modules.sh

lint:
name: lint module
runs-on: ubuntu-latest
needs: resolve-modules
strategy:
matrix: ${{ fromJson(needs.resolve-modules.outputs.matrix) }}
runs-on: [ self-hosted, X64 ]
steps:
- uses: actions/checkout@v3
- name: Lint
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Golangci Lint
# https://golangci-lint.run/
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ${{ matrix.workdir }}
args: -E gofumpt --timeout 10m
skip-pkg-cache: true
version: latest
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
unit-benchmark-test:
strategy:
matrix:
go: [ 1.21.1 ]
go: [ 1.20.1 ]
os: [ X64, ARM64 ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -26,7 +26,10 @@ jobs:
# ${{ runner.os }}-go-

- name: Unit Test
run: make test
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Unit Test V2
run: cd v2 && go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Benchmark
run: go test -bench=. -benchmem -run=none ./...
66 changes: 0 additions & 66 deletions example/go.mod

This file was deleted.

Loading

0 comments on commit 06f235d

Please sign in to comment.