Skip to content

Commit

Permalink
Merge pull request #86 from identity-com/develop
Browse files Browse the repository at this point in the history
0.1.0 RC1
  • Loading branch information
dankelleher authored Oct 15, 2021
2 parents 41283dc + 844c16f commit b78f116
Show file tree
Hide file tree
Showing 267 changed files with 69,039 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CLI
on:
push:
paths:
- 'cli/**'
pull_request:
jobs:
build:
name: Build, lint, and test the cryptid cli on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Cache node dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn

- name: Build Dependencies
run: yarn workspace @identity.com/cryptid build

- name: Lint
run: yarn workspace @identity.com/cryptid-cli lint

- name: Test
run: yarn workspace @identity.com/cryptid-cli test

- name: Build
run: yarn workspace @identity.com/cryptid-cli pack
106 changes: 106 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Client
on:
push:
paths:
- 'client/**'
pull_request:
jobs:
build:
name: Build, lint, and test the cryptid client on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Cache node dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn

- name: Lint
run: yarn workspace @identity.com/cryptid lint

- name: Test
run: yarn workspace @identity.com/cryptid test --ci --coverage --maxWorkers=2

- name: Build
run: yarn workspace @identity.com/cryptid build

E2E:
name: Test the cryptid client against the on-chain program on Solana ${{ matrix.solana }}, Node ${{ matrix.node }}, Rust ${{ matrix.rust }}, and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
os: [ubuntu-latest]
solana: ['v1.7.12']
rust: ['1.55']

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}

- name: Cache build dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}

- name: Cache Solana version
uses: actions/cache@v2
with:
path: |
~/.cache
key: solana-${{ matrix.solana }}

- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/${{ matrix.solana }}/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Cache node dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn

- name: Build program
uses: actions-rs/cargo@v1
with:
command: build-bpf

- name: Test e2e
run: yarn workspace @identity.com/cryptid run test-e2e

132 changes: 132 additions & 0 deletions .github/workflows/programs-cryptid-signer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Programs-Cryptid-Signer
on:
push:
paths:
- 'programs-cryptid-signer'
pull_request:
jobs:
program-lint:
name: Format and lint the cryptid on-chain program on Rust ${{ matrix.rust }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ['1.55']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy

- name: Run fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: cargo-clippy-${{ hashFiles('Cargo.lock') }}

- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- --deny=warnings

program-unit-test:
name: Test program on Rust ${{ matrix.rust }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ['1.55']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}

- name: Cache build dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: cargo-test-${{ hashFiles('Cargo.lock') }}

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test


program-integration-test:
name: Integration test the cryptid on-chain program on Solana ${{ matrix.solana }}, Rust ${{ matrix.rust }}, and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: ['1.55']
solana: ['v1.7.12']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}

- name: Cache build dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: cargo-build-${{ hashFiles('Cargo.lock') }}

- name: Cache Solana version
uses: actions/cache@v2
with:
path: |
~/.cache
key: solana-${{ matrix.solana }}

- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.solana.com/${{ matrix.solana }}/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Build programs
uses: actions-rs/cargo@v1
with:
command: build-bpf

- name: Run integration tests
uses: actions-rs/cargo@v1
with:
command: test-bpf
env:
RUST_LOG: solana_rbpf::vm=debug,solana_runtime::message_processor=debug,solana_runtime::system_instruction_processor=trace,solana_program_test=info,cryptid_signer=trace
RUST_BACKTRACE: 1
47 changes: 47 additions & 0 deletions .github/workflows/wallet-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Wallet
on:
push:
branches:
- develop
- main
jobs:
deploy:
name: Build and deploy the cryptid wallet on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
os: [ubuntu-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Cache node dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn

- name: Build Dependencies
run: yarn workspace @identity.com/cryptid build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy
# set CI=false to ignore lint warnings inherited from sollet.io (until fixed)
run: CI=false STAGE=prod yarn workspace @identity.com/cryptid-wallet deploy
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*.log
.DS_Store

# yarn
**/node_modules
**/dist
**/.nyc_output/

# Solana
**/test-ledger

### Rust
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

### IDE
.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cryptid-docs.identity.com
Loading

0 comments on commit b78f116

Please sign in to comment.