ci: add per-language GitHub Actions workflows #12
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| --- | |
| name: Meta | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: ["*"] | |
| merge_group: | |
| types: [checks_requested] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "meta-${{ github.event.pull_request.number || github.sha }}" | |
| cancel-in-progress: true | |
| jobs: | |
| yaml-lint: | |
| runs-on: depot-ubuntu-24.04-arm-small | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install yamllint | |
| run: pip3 install yamllint | |
| - name: Lint workflow YAML | |
| run: "yamllint -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows/" | |
| markdown-lint: | |
| runs-on: depot-ubuntu-24.04-arm-small | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install markdownlint-cli2 | |
| run: npm install -g markdownlint-cli2 | |
| - name: Lint Markdown | |
| run: markdownlint-cli2 | |
| gen-nodiff: | |
| runs-on: depot-ubuntu-24.04-arm-8 | |
| 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 | |
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@48b5f213c81028ace310571dc5ec0fbbca0b2947 # v4 | |
| - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: false | |
| working-directory: spicedb-ruby | |
| - name: Install Ruby deps | |
| working-directory: spicedb-ruby | |
| run: bundle install | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| workspaces: spicedb-rust | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install buf | |
| uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 # v1 | |
| - 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: Generate all clients | |
| run: mage gen:all | |
| - name: Fail if generated files drifted | |
| uses: chainguard-dev/actions/nodiff@3e76343fe029f8e2a10bfbec0da8f437e5dab7a5 # main | |
| with: | |
| path: "" | |
| fixup-command: mage gen:all |