feat: hand history tracking #98
Workflow file for this run
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: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@v1 | |
| - name: Cache Go modules and tools | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| .hermit/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', '**/go.mod') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Format check | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "Go files not formatted. Run: task format" | |
| gofmt -l . | |
| exit 1 | |
| fi | |
| - name: Install code generation tools | |
| run: task tools | |
| - name: Build | |
| run: task build | |
| - name: Run tests | |
| run: task test | |
| env: | |
| GOTESTSUM_FORMAT: github-actions | |
| goreleaser: | |
| name: Validate GoReleaser Config | |
| runs-on: ubuntu-latest | |
| if: contains(github.event.head_commit.modified, '.goreleaser.yml') || contains(github.event.pull_request.files.*.filename, '.goreleaser.yml') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@v1 | |
| - name: Validate GoReleaser config | |
| run: goreleaser check | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cashapp/activate-hermit@v1 | |
| - name: Cache Go modules and tools | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| .hermit/go/bin | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', '**/go.mod') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install code generation tools | |
| run: task tools | |
| - name: Generate code | |
| run: task generate | |
| - name: Check formatting | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "Go files not formatted:" | |
| gofmt -l . | |
| exit 1 | |
| fi | |
| - name: Run golangci-lint | |
| run: task lint | |
| - name: Check for TODO/FIXME comments | |
| run: | | |
| if grep -r "TODO\|FIXME" . --include="*.go" --exclude-dir=.git --exclude-dir=vendor; then | |
| echo "Found TODO/FIXME comments that should be addressed or tracked as issues" | |
| exit 0 # Don't fail, just warn | |
| fi |