Replace custom writer package with kio.ByteWriter #42
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: Test and Lint | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test-and-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.24.4' | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', 'go.work.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Sync workspace | |
run: go work sync | |
- name: Create bin directory | |
run: mkdir -p bin | |
- name: Build (includes tidy and formatting) | |
run: make build | |
- name: Run tests | |
run: make test | |
- name: Run linter | |
run: make lint | |
- name: Check formatting and tidy | |
run: | | |
if [ -n "$(git diff --name-only)" ]; then | |
echo "Code is not formatted or dependencies not tidy. Please run 'make build'" | |
git diff | |
exit 1 | |
fi | |
- name: Run go vet | |
run: make vet |