feat: CI #1
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: pull-request | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-pull-request | |
| cancel-in-progress: true | |
| jobs: | |
| check-format: | |
| runs-on: ubicloud-standard-2 | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Get Sources | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: ./.github/actions/install-rust | |
| with: | |
| components: clippy, rustfmt | |
| - name: cargo fmt | |
| shell: bash | |
| run: | | |
| cargo fmt --check | |
| - name: cargo clippy | |
| shell: bash | |
| run: | | |
| cargo clippy --locked | |
| run-tests: | |
| runs-on: ubicloud-standard-8 | |
| strategy: | |
| matrix: | |
| version: | |
| - gateway: "0.29.0" | |
| sdk: "0.8.0" | |
| cli: "0.86.1" | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - name: Get Sources | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: ./.github/actions/install-rust | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Install CLI | |
| shell: bash | |
| run: | | |
| curl -fsSL https://grafbase.com/downloads/cli | bash -s ${{ matrix.version.cli }} | |
| - name: Install Gateway | |
| shell: bash | |
| run: | | |
| curl -fsSL https://grafbase.com/downloads/gateway | bash -s ${{ matrix.version.gateway }} | |
| - name: cargo test | |
| shell: bash | |
| run: | | |
| cargo run -p test-matrix -- --sdk-version ${{ matrix.version.gateway }} |