feat: session key authentication #555
This file contains 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: SX-Starknet Workflow | |
env: | |
STARKNET_SIERRA_COMPILE_PATH: ./cairo/bin/starknet-sierra-compile | |
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: YES | |
ADDRESS: "0x347be35996a21f6bf0623e75dbce52baba918ad5ae8d83b6f416045ab22961a" | |
PUBLIC_KEY: "0x674efe292c3c1125108916d6128bd6d1db4528db07322a84177551067aa2bef" | |
PK: "0xbdd640fb06671ad11c80317fa3b1799d" | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
jobs: | |
solidity: | |
strategy: | |
fail-fast: true | |
name: Forge tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out main branch | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Check formatting | |
working-directory: ./ethereum | |
run: forge fmt --check | |
- name: Build Solidity contracts | |
working-directory: ./ethereum | |
run: | | |
forge --version | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
working-directory: ./ethereum | |
run: | | |
forge test -vvv | |
id: test | |
cairo: | |
strategy: | |
fail-fast: true | |
name: Cairo tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out main branch | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.16.0 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
yarn- | |
- name: Install Yarn dependencies | |
run: yarn install | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Python dependencies | |
run: | | |
sudo apt install -y libgmp3-dev | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Install Cairo | |
run: curl -L https://github.com/starkware-libs/cairo/releases/download/v2.2.0/release-x86_64-unknown-linux-musl.tar.gz > cairo.tar.gz | |
- name: Extract Cairo | |
run: tar -xvf cairo.tar.gz | |
- name: Install Scarb | |
uses: software-mansion/setup-scarb@v1 | |
with: | |
scarb-version: 0.7.0 | |
- name: Check Cairo formatting | |
working-directory: ./starknet | |
run: scarb fmt --check | |
- name: Build Cairo contracts | |
working-directory: ./starknet | |
run: scarb build --verbose | |
- name: Run Cairo tests | |
working-directory: ./starknet | |
run: scarb test --verbose | |
- name: Compile Cairo contracts for Hardhat tests | |
run: yarn hardhat starknet-build | |
- name: run Hardhat tests | |
run: yarn test:l1-execution; yarn test:eth-sig-auth; yarn test:stark-sig-auth; yarn test:eth-tx-auth |