diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index abd324d..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: CI - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - ci: - name: CI Check - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: 1.24.x - - - name: Install tools - run: make tools - - - name: Run CI - run: make ci - - format-check: - name: Format Check - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: 1.24.x - - - name: Check formatting - run: | - make fmt - if [ -n "$(git status --porcelain)" ]; then - echo "Code is not formatted. Please run 'make fmt'" - git diff - exit 1 - fi diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/lint.yml similarity index 93% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/lint.yml index 0fa859d..d3416ca 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: golangci-lint +name: Lint on: push: @@ -11,8 +11,7 @@ permissions: pull-requests: read jobs: - golangci: - name: lint + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 78% rename from .github/workflows/go.yml rename to .github/workflows/test.yml index cd62f5b..cf8a04e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Build Status +name: Test on: push: @@ -31,11 +31,62 @@ jobs: - name: Build run: make build + - name: Test + run: make test + + vet: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.x + + - name: Install dependencies + run: make deps + - name: Run go vet run: make vet - - name: Test - run: make test + format-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.x + + - name: Check formatting + run: | + make fmt + if [ -n "$(git status --porcelain)" ]; then + echo "Code is not formatted. Please run 'make fmt'" + git diff + exit 1 + fi + + verify-mod: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.24.x + + - name: Check go.mod + run: make check-mod coverage: runs-on: ubuntu-latest @@ -83,18 +134,3 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "### Per-package coverage:" >> $GITHUB_STEP_SUMMARY go tool cover -func=coverage.out | grep -v "total:" | awk '{printf "- %s: %s\n", $2, $3}' >> $GITHUB_STEP_SUMMARY - - verify-mod: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: 1.24.x - - - name: Check go.mod - run: make check-mod