feat: init repo #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go CI | |
| on: | |
| push: | |
| branches: [ "main", "release/*" ] | |
| pull_request: | |
| branches: [ "main", "release/*" ] | |
| jobs: | |
| test: | |
| name: Unit Test | |
| runs-on: ubuntu-latest | |
| needs: static-check | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go 1.22 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.22 | |
| cache: true | |
| - name: Run unit tests | |
| run: make unit-test | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-go1.22 | |
| path: cover.out | |
| static-check: | |
| name: Static Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go 1.22 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.22 | |
| cache: true | |
| - name: Lint | |
| run: make golangci-lint | |
| - name: Go Format | |
| run: make gofmt | |
| - name: Addlicense | |
| run: make addlicense | |
| - name: Check Difference | |
| run: git diff --exit-code |