-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2528d3b
Showing
12 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ignore: | ||
- "crates/**/*test*.rs" | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto # set the target coverage to the value of the parent commit | ||
threshold: 0% # pct of drop in coverage that is still considered as success | ||
informational: true # if true does not fail the CI is coverage is bellow the target value | ||
only_pulls: true # run only on PRs | ||
patch: | ||
default: | ||
target: 100% | ||
threshold: 0% | ||
informational: true | ||
only_pulls: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- main-v[0-9].** | ||
tags: | ||
- v[0-9].** | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- auto_merge_enabled | ||
- edited | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install commitlint | ||
run: npm install --global @commitlint/cli @commitlint/config-conventional | ||
|
||
- name: Validate PR commits with commitlint | ||
if: github.event_name == 'pull_request' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) | ||
run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | ||
|
||
- name: Validate PR title with commitlint | ||
if: github.event_name != 'merge_group' && github.event_name != 'push' && !(contains(github.event.pull_request.title, '/merge-main') || contains(github.event.pull_request.title, '/merge main')) | ||
run: echo "${{ github.event.pull_request.title }}" | commitlint --verbose | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
components: rustfmt | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: scripts/rust_fmt.sh --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: scripts/clippy.sh | ||
|
||
run-python-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
- run: pytest scripts/merge_paths_test.py | ||
|
||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo test | ||
|
||
udeps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
name: "Rust Toolchain Setup" | ||
with: | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
id: "cache-cargo" | ||
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} | ||
name: "Download and run cargo-udeps" | ||
run: | | ||
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz | ||
cargo-udeps-*/cargo-udeps udeps | ||
env: | ||
RUSTUP_TOOLCHAIN: nightly-2024-01-12 | ||
|
||
|
||
all-tests: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- clippy | ||
- commitlint | ||
- format | ||
- run-python-tests | ||
- run-tests | ||
- udeps | ||
steps: | ||
- name: Decide whether all the needed jobs succeeded or failed | ||
uses: re-actors/[email protected] | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v[0-9].** | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
paths: | ||
- 'crates/blockifier/feature_contracts/cairo0/**' | ||
|
||
jobs: | ||
verify_cairo_file_dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
components: rustfmt | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
- run: | ||
pip install -r crates/blockifier/tests/requirements.txt; | ||
cargo test verify_feature_contracts -- --include-ignored |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Coverage | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Generate code coverage | ||
run: cargo llvm-cov --codecov --output-path codecov.json | ||
env: | ||
SEED: 0 | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
fail_ci_if_error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: post-merge | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
jobs: | ||
if_merged: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
components: rustfmt | ||
toolchain: nightly-2024-01-12 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
- run: | ||
pip install -r crates/blockifier/tests/requirements.txt; | ||
cargo test -- --include-ignored |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Nightly Latest Dependencies Check | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | ||
|
||
jobs: | ||
latest_deps: | ||
name: Latest Dependencies | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Update Dependencies | ||
run: cargo update --verbose | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Test | ||
run: cargo test --verbose |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.egg-info | ||
/data | ||
/logs | ||
build | ||
dist | ||
target | ||
*/.vscode/* | ||
*.DS_Store | ||
|
||
tmp_venv/* | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cargo clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \ | ||
-D nonstandard-style -D rust-2018-idioms -D unused |
Oops, something went wrong.