Skip to content

chore(workflows): Fix benchmark workflow #137

chore(workflows): Fix benchmark workflow

chore(workflows): Fix benchmark workflow #137

Workflow file for this run

name: Unit Test
on:
push:
branches-ignore: ['main']
paths-ignore: ['README.md', 'examples/**', '/github/workflows/bench.yml', '/github/workflows/build.yml']
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Set up UV
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
with:
enable-cache: false
- name: Get go paths
id: gopaths
run: echo "path=$(go env GOPATH)" >> "$GITHUB_OUTPUT"
- name: Cache installed Go binaries
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
${{ steps.gopaths.outputs.path }}/bin
${{ steps.gopaths.outputs.path }}/include
key: ${{ runner.os }}-gobin-${{ hashfiles('Makefile') }}
- name: Check code generation
run: make gen
- name: Check linting
run: |
OUTPUT=$(make lint)
if [ -n "$OUTPUT" ]; then
echo "Linting errors found:"
echo "$OUTPUT"
exit 1
else
echo "No linting errors found."
fi
- name: Run unit tests
run: make test
- name: Test Summary
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: "unit-tests.xml"
output: "test-summary.md"
if: always()