Merge pull request #1 from nsheaps/claude/gh-ext-issue-sync-VD8Vs #2
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: ci | |
| 'on': | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref == 'refs/heads/main' && 'ci-cd-main' || format('ci-{0}', github.ref) }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install tools | |
| uses: jdx/mise-action@v3 | |
| with: | |
| install: true | |
| cache: ${{ github.event_name == 'pull_request' }} | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test with coverage | |
| run: go test -v -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Display coverage summary | |
| run: go tool cover -func=coverage.out | |
| lint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install tools | |
| uses: jdx/mise-action@v3 | |
| with: | |
| install: true | |
| cache: ${{ github.event_name == 'pull_request' }} | |
| - name: Go vet | |
| run: go vet ./... | |
| - name: Prettier check | |
| run: prettier --check . |