diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b12dada..3b3d349 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,100 +1,104 @@ -name: CI - -on: - pull_request: - push: - branches: [main] - -jobs: - test: - name: Test (Go ${{ matrix.go-version }}) - runs-on: ubuntu-latest - strategy: - matrix: - go-version: ['1.21', '1.22', '1.23'] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - cache: true - - - name: Download dependencies - run: go mod download - - - name: Run tests - run: go test -v -race -coverprofile=coverage.out ./... - - - name: Upload coverage - if: matrix.go-version == '1.23' - uses: codecov/codecov-action@v4 - with: - files: coverage.out - fail_ci_if_error: false - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: latest - args: --timeout=5m - - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build - run: go build ./... - - - name: Verify go.mod is tidy - run: | - go mod tidy - git diff --exit-code go.mod go.sum - - benchmark: - name: Benchmark - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Run benchmarks - run: go test -bench=. -benchmem ./... | tee benchmark.txt - - - name: Store benchmark result - uses: actions/upload-artifact@v4 - with: - name: benchmark-results - path: benchmark.txt +#name: CI +# +#on: +# pull_request: +# push: +# branches: [main] +# +#jobs: +# test: +# name: Test (Go ${{ matrix.go-version }}) +# runs-on: ubuntu-latest +# strategy: +# matrix: +# go-version: ['1.21', '1.22', '1.23'] +# +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# +# - name: Setup Go +# uses: actions/setup-go@v5 +# with: +# go-version: ${{ matrix.go-version }} +# cache: true +# cache-dependency-path: go.mod +# +# - name: Download dependencies +# run: go mod download +# +# - name: Run tests +# run: go test -v -race -coverprofile=coverage.out ./... +# +# - name: Upload coverage +# if: matrix.go-version == '1.23' +# uses: codecov/codecov-action@v4 +# with: +# files: coverage.out +# fail_ci_if_error: false +# +# lint: +# name: Lint +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# +# - name: Setup Go +# uses: actions/setup-go@v5 +# with: +# go-version: '1.23' +# cache: true +# cache-dependency-path: go.mod +# +# - name: Run golangci-lint +# uses: golangci/golangci-lint-action@v6 +# with: +# version: latest +# args: --timeout=5m +# +# build: +# name: Build +# runs-on: ubuntu-latest +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# +# - name: Setup Go +# uses: actions/setup-go@v5 +# with: +# go-version: '1.23' +# cache: true +# cache-dependency-path: go.mod +# +# - name: Build +# run: go build ./... +# +# - name: Verify go.mod is tidy +# run: | +# go mod tidy +# git diff --exit-code go.mod +# +# benchmark: +# name: Benchmark +# runs-on: ubuntu-latest +# if: github.event_name == 'pull_request' +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# +# - name: Setup Go +# uses: actions/setup-go@v5 +# with: +# go-version: '1.23' +# cache: true +# cache-dependency-path: go.mod +# +# - name: Run benchmarks +# run: go test -bench=. -benchmem ./... | tee benchmark.txt +# +# - name: Store benchmark result +# uses: actions/upload-artifact@v4 +# with: +# name: benchmark-results +# path: benchmark.txt diff --git a/.golangci.yml b/.golangci.yml index 9d18d42..bace925 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -54,7 +54,7 @@ linters-settings: disabled-checks: - hugeParam - whyNoLint - - commentedOutCod + - commentedOutCode gofmt: simplify: true