This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
77 lines (75 loc) · 2.25 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: test
on:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Setup rust env
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: llvm-tools-preview, rustfmt, clippy
override: true
toolchain: 1.74.0
- name: Retrieve cached dependencies
uses: Swatinem/rust-cache@v2
- name: Setup coverage env
uses: taiki-e/install-action@cargo-llvm-cov
# nextest setup
- uses: taiki-e/install-action@nextest
# Load lib submodules
- name: Load submodules
id: cached-submodules
uses: actions/cache/restore@v3
with:
path: ./lib/
key: ${{ runner.os }}-submodules
# Install Foundry
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# Install Python
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- 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
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Setup the Kakarot submodule
run: make setup
# Create dump
- name: Create dump
run: ./scripts/make_with_env.sh && make dump-katana
- name: Lint
run: |
cargo check &&
cargo fmt --all -- --check &&
cargo clippy --workspace --all-features --all-targets -- -D warnings
- name: Generate code coverage
run: make test-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: false