Skip to content

chore(deps): update actions/checkout action to v6 #599

chore(deps): update actions/checkout action to v6

chore(deps): update actions/checkout action to v6 #599

Workflow file for this run

name: pull-request
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-pull-request
cancel-in-progress: true
jobs:
check-format:
runs-on: ubuntu-24.04
env:
RUSTFLAGS: -D warnings
steps:
- name: Get Sources
uses: actions/checkout@v6
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- name: Install Rust
uses: ./.github/actions/install-rust
with:
components: clippy, rustfmt
- name: cargo fmt
shell: bash
run: |
cargo fmt --check
- name: Install Protoc for the gRPC extension
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3
- name: cargo clippy
shell: bash
env:
RUSTC_WRAPPER: sccache
run: |
cargo clippy --locked
- uses: uncenter/setup-taplo@4f203fdb4f3b1e289c8382cf90d8397d2338df2e # v1.0.8
with:
version: "0.9.3"
- name: taplo fmt check
shell: bash
run: |
taplo fmt --check
taplo check
run-tests:
runs-on: ubuntu-24.04
strategy:
matrix:
version:
- gateway: "0.48.1"
cli: "0.102.2"
env:
RUSTFLAGS: -D warnings
steps:
- name: Get Sources
uses: actions/checkout@v6
- name: Start Docker Services
shell: bash
run: |
docker compose up -d
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- name: Install Rust
uses: ./.github/actions/install-rust
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
with:
cache-workspace-crates: true
prefix-key: cargo-v1
- name: Install Grafbase
uses: ./.github/actions/install-grafbase
with:
gateway-version: ${{ matrix.version.gateway }}
cli-version: ${{ matrix.version.cli }}
- name: Install cargo-nextest
uses: taiki-e/install-action@3216b6964cbfe053bb8b9a2ef245bd9300e2061d # v2.62.14
with:
tool: nextest
- name: Install Protoc for the gRPC extension
uses: arduino/setup-protoc@f4d5893b897028ff5739576ea0409746887fa536 # v3
- name: Run Tests
shell: bash
env:
RUSTC_WRAPPER: sccache
run: |
cargo run -p test-matrix
- name: Test protoc-gen-grafbase-subgraph
# Will fail if there is nothing to build.
continue-on-error: true
run: |
if [[ "$TARGET_PLATFORM" == "x86_64-unknown-linux-musl" ]]; then
protobuf_release_arch="linux-x86_64"
elif [[ "$TARGET_PLATFORM" == "aarch64-unknown-linux-musl" ]]; then
protobuf_release_arch="linux-aarch_64"
elif [[ "$TARGET_PLATFORM" == "aarch64-apple-darwin" ]]; then
protobuf_release_arch="osx-aarch_64"
fi
sudo mkdir -p /usr/local/include/google
sudo chown -R $USER /usr/local/include/google
curl -L https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-${protobuf_release_arch}.zip -o protoc.zip
unzip protoc.zip -d /usr/local
chmod +x /usr/local/bin/protoc
rm protoc.zip
cargo nextest run -p protoc-gen-grafbase-subgraph
env:
TARGET_PLATFORM: ${{ matrix.platform.target }}