Skip to content

feat: add POST /v1/enclave-assignment and an attestation-verifying client #79

feat: add POST /v1/enclave-assignment and an attestation-verifying client

feat: add POST /v1/enclave-assignment and an attestation-verifying client #79

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
RUST_BACKTRACE: 1
jobs:
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.97.0
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mint biometric-engines access token
id: biometric-engines-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
client-id: ${{ secrets.BIOMETRIC_ENGINES_APP_ID }}
private-key: ${{ secrets.BIOMETRIC_ENGINES_APP_PRIVATE_KEY }}
owner: worldcoin
repositories: biometric-engines
- uses: dtolnay/rust-toolchain@1.97.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Configure private Git dependencies
env:
BIOMETRIC_ENGINES_TOKEN: ${{ steps.biometric-engines-token.outputs.token }}
run: |
git config --global \
url."https://x-access-token:${BIOMETRIC_ENGINES_TOKEN}@github.com/worldcoin/biometric-engines".insteadOf \
"https://github.com/worldcoin/biometric-engines"
- name: Run Clippy
run: cargo clippy --locked --all-targets --all-features --
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mint biometric-engines access token
id: biometric-engines-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
client-id: ${{ secrets.BIOMETRIC_ENGINES_APP_ID }}
private-key: ${{ secrets.BIOMETRIC_ENGINES_APP_PRIVATE_KEY }}
owner: worldcoin
repositories: biometric-engines
- uses: dtolnay/rust-toolchain@1.97.0
- uses: Swatinem/rust-cache@v2
- name: Configure private Git dependencies
env:
BIOMETRIC_ENGINES_TOKEN: ${{ steps.biometric-engines-token.outputs.token }}
run: |
git config --global \
url."https://x-access-token:${BIOMETRIC_ENGINES_TOKEN}@github.com/worldcoin/biometric-engines".insteadOf \
"https://github.com/worldcoin/biometric-engines"
- name: Build debug
run: cargo build --locked --verbose
- name: Build release
run: cargo build --locked --release --verbose
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mint biometric-engines access token
id: biometric-engines-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
client-id: ${{ secrets.BIOMETRIC_ENGINES_APP_ID }}
private-key: ${{ secrets.BIOMETRIC_ENGINES_APP_PRIVATE_KEY }}
owner: worldcoin
repositories: biometric-engines
- uses: dtolnay/rust-toolchain@1.97.0
- uses: Swatinem/rust-cache@v2
- name: Configure private Git dependencies
env:
BIOMETRIC_ENGINES_TOKEN: ${{ steps.biometric-engines-token.outputs.token }}
run: |
git config --global \
url."https://x-access-token:${BIOMETRIC_ENGINES_TOKEN}@github.com/worldcoin/biometric-engines".insteadOf \
"https://github.com/worldcoin/biometric-engines"
- name: Run tests
run: cargo test --locked --all --verbose
deny:
name: Cargo deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
steps:
- uses: actions/checkout@v4
- name: Mint biometric-engines access token
id: biometric-engines-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
client-id: ${{ secrets.BIOMETRIC_ENGINES_APP_ID }}
private-key: ${{ secrets.BIOMETRIC_ENGINES_APP_PRIVATE_KEY }}
owner: worldcoin
repositories: biometric-engines
- uses: EmbarkStudios/cargo-deny-action@v2
continue-on-error: ${{ matrix.checks == 'advisories' }}
with:
command: check ${{ matrix.checks }}
rust-version: 1.97.0
credentials: https://x-access-token:${{ steps.biometric-engines-token.outputs.token }}@github.com