Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 31 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,34 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@1.87
with:
components: clippy

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

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

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

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

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- uses: actions/checkout@v4

- name: Install toolchains
uses: jdx/mise-action@v2

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

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

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

- name: Fetch openapi
run: mise pull-openapi

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

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
target
openapi.json
*.pem
!tests/test_private_key.pem
!tests/test_public_key.pem
10 changes: 1 addition & 9 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[tools]
yq = "latest"
jq = "latest"
# note: rust-toolchain.toml is an 'idiomatic version file' for rust and mise does
# pick it up automatically, but it is currently behind a experimental flag
rust = "{{ exec(command='yq .toolchain.channel rust-toolchain.toml') }}"
rust = { version = "{{ exec(command='./scripts/rust-version.sh') }}", components = "clippy" }
cargo-binstall = "latest"
"cargo:bacon" = "latest"
"cargo:cargo-progenitor" = "latest"

[env]
_.file = ['.env', '.env.local']
Expand Down Expand Up @@ -38,12 +36,6 @@ run = [
"curl https://api.privy.io/v1/openapi.json | jq -s -f 'scripts/openapi.jq' openapi.overlay.json - | sed \"s/anyOf/oneOf/g\" > openapi.json",
]

[tasks.generate-openapi]
description = "Generate the Rust code from the OpenAPI spec"
run = [
"cargo progenitor --input openapi.json --output crates/privy-api --name privy-api --version 0.0.1 --interface builder --include-client=false"
]

[tasks.gen-p256-key]
description = "Generate P-256 key pair for Privy wallet owner"
run = [
Expand Down
Loading
Loading