Introduce internal components #638
Workflow file for this run
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: | |
ADDRESS: "0x34ba56f92265f0868c57d3fe72ecab144fc96f97954bbbc4252cef8e8a979ba" | |
PUBLIC_KEY: "0x5a5e37c60e77a0318643b111f88413a76af6233c891a0cfb2804106372006d4" | |
PK: "0xb137668388dbe9acdfa3bc734cc2c469" | |
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.17.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: Install Scarb | |
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.6.5 | |
- 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: run Hardhat tests | |
run: yarn test-ts |