Skip to content

ci: add per-language GitHub Actions workflows #10

ci: add per-language GitHub Actions workflows

ci: add per-language GitHub Actions workflows #10

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: spicedb-gen
on:
push:
branches: [main]
pull_request:
branches: ["*"]
merge_group:
types: [checks_requested]
permissions:
contents: read
concurrency:
group: "spicedb-gen-${{ github.event.pull_request.number || github.sha }}"
cancel-in-progress: true
jobs:
paths-filter:
runs-on: depot-ubuntu-24.04-arm-small
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
id: filter
with:
filters: |
changed:
- '.github/workflows/spicedb-gen.yaml'
- 'Magefile.go'
- 'go.mod'
- 'go.sum'
- 'spicedb-gen/**'
test:
needs: paths-filter
if: needs.paths-filter.outputs.changed == 'true'
runs-on: depot-ubuntu-24.04-arm-4
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install mage
run: go install github.com/magefile/mage@latest
- name: Unit tests
run: mage -d spicedb-gen test
go-int:
needs: paths-filter
if: needs.paths-filter.outputs.changed == 'true'
runs-on: depot-ubuntu-24.04-arm-4
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install mage
run: go install github.com/magefile/mage@latest
- name: Go integration test
run: mage -d spicedb-gen goIntegrationTest
ts-int:
needs: paths-filter
if: needs.paths-filter.outputs.changed == 'true'
runs-on: depot-ubuntu-24.04-arm-4
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install mage
run: go install github.com/magefile/mage@latest
- name: Install pnpm deps
run: pnpm install --frozen-lockfile
- name: Build proto package
run: pnpm --filter @spicedb/proto build
- name: Build client package
run: pnpm --filter @spicedb/client build
- name: TypeScript integration test
run: mage -d spicedb-gen typeScriptIntegrationTest
java-int:
needs: paths-filter
if: needs.paths-filter.outputs.changed == 'true'
runs-on: depot-ubuntu-24.04-arm-4
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@48b5f213c81028ace310571dc5ec0fbbca0b2947 # v4
- name: Install mage
run: go install github.com/magefile/mage@latest
- name: Java integration test
run: mage -d spicedb-gen javaIntegrationTest
python-int:
needs: paths-filter
if: needs.paths-filter.outputs.changed == 'true'
runs-on: depot-ubuntu-24.04-arm-4
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
with:
enable-cache: true
- name: Install mage
run: go install github.com/magefile/mage@latest
- name: Install pyright (positive + expected-failure checks)
run: uv tool install pyright
- name: Python integration test
run: mage -d spicedb-gen pythonIntegrationTest