fix: use embedded specs in tests instead of sibling jni directory #9
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] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Run unit tests | |
| run: go test ./grpc/server/acl/ ./grpc/server/certauth/ ./tools/... | |
| vet: | |
| name: Vet | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Vet packages | |
| # handlestore requires CGO (imports jni core with JNI headers) | |
| run: go vet ./grpc/server/acl/ ./grpc/server/certauth/ ./tools/... | |
| build: | |
| name: Build binaries | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| binary: [jnicli, jniserviceadmin] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Build (linux/amd64) | |
| env: | |
| BINARY: ${{ matrix.binary }} | |
| run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /dev/null "./cmd/${BINARY}/" | |
| - name: Build (linux/arm64) | |
| env: | |
| BINARY: ${{ matrix.binary }} | |
| run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o /dev/null "./cmd/${BINARY}/" | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Install golangci-lint v2 | |
| run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest | |
| - name: Lint | |
| # handlestore requires CGO (imports jni core with JNI headers) | |
| run: golangci-lint run --build-tags="" ./grpc/server/acl/ ./grpc/server/certauth/ ./tools/... ./cmd/jnicli/ ./cmd/jniserviceadmin/ |