privy-rs 0.1.0-alpha.6

Privy SDK for Rust
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always
  PRIVY_TEST_APP_ID: ${{ secrets.PRIVY_TEST_APP_ID }}
  PRIVY_TEST_APP_SECRET: ${{ secrets.PRIVY_TEST_APP_SECRET }}
  PRIVY_TEST_JWT_PRIVATE_KEY: ${{ secrets.PRIVY_TEST_JWT_PRIVATE_KEY }}
  PRIVY_TEST_URL: ${{ secrets.PRIVY_TEST_URL }}
  # staging authorization flow is very flaky. we'll remove this eventually
  MARK_FLAKY_TESTS_RETRIES: 20

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6

      - uses: jdx/mise-action@v2
        with:
          install: false
          experimental: true

      - name: Install toolchains
        run: |
          VERSION=$(./scripts/rust-version.sh)
          mise install rust jq

      - name: Cache cargo registry
        uses: actions/cache@v5
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo index
        uses: actions/cache@v5
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo build
        uses: actions/cache@v5
        with:
          path: target
          key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

      - name: Run clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Run tests
        run: cargo test --verbose

      - name: Compile examples
        run: cargo test --examples --no-run

      - name: Run doc tests
        run: cargo test --doc