Skip to content

feat: add ef-tests to CI #9

feat: add ef-tests to CI

feat: add ef-tests to CI #9

Workflow file for this run

name: EF Tests
on:
pull_request:
branches:
- main
permissions: read-all
jobs:
ef-tests:
runs-on: ubuntu-latest
steps:
# Install packages
- name: install packages
run: sudo apt-get install curl
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# Build Kakarot
- uses: actions/checkout@v3
with:
path: kakarot
- uses: actions/setup-python@v4
with:
python-version: 3.9.13
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- run: poetry config installer.modern-installation false
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
# TODO: investigate why cache is not working and remove this
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: make setup
working-directory: kakarot
- name: Build
run: |
STARKNET_NETWORK=katana poetry run python ./scripts/compile_kakarot.py && make build-sol
working-directory: kakarot
# run ef-tests
- name: Checkout ef-tests
uses: actions/checkout@v3
with:
repository: kkrt-labs/ef-tests
path: ef-test
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
- name: setup
run: make setup && make pull-kakarot
working-directory: ef-test
- uses: taiki-e/install-action@nextest
- name: copy kakarot builds
run: cp -r ./kakarot/build ./ef-test/lib/kakarot
# run tests
- name: run tests
run: cargo test -p ef-testing --features ef-tests -- --nocapture
working-directory: ef-test