Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add yaml linter #756

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/rust/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
--- # Common CI steps

name: "Rust"
description: |
Common steps for CI

See <https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action>

runs:
using: composite
using: composite
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
Expand Down
22 changes: 12 additions & 10 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
--- # Github labeler configuration file

# Add 'crate: mpt_trie' label to any changes within 'mpt_trie' folder.
'crate: mpt_trie':
- changed-files:
- any-glob-to-any-file: mpt_trie/**
- changed-files:
- any-glob-to-any-file: mpt_trie/**

# Add 'crate: evm_arithmetization' label to any changes within 'evm_arithmetization' folder.
'crate: evm_arithmetization':
- changed-files:
- any-glob-to-any-file: evm_arithmetization/**
- changed-files:
- any-glob-to-any-file: evm_arithmetization/**

# Add 'crate: trace_decoder' label to any changes within 'trace_decoder' folder.
'crate: trace_decoder':
- changed-files:
- any-glob-to-any-file: trace_decoder/**
- changed-files:
- any-glob-to-any-file: trace_decoder/**

# Add 'crate: zero_bin' label to any changes within 'zero' folder.
'crate: zero_bin':
- changed-files:
- any-glob-to-any-file: zero/**
- changed-files:
- any-glob-to-any-file: zero/**

# Add 'specs' label to any changes within 'docs' or `book` folder.
'specs':
- changed-files:
- any-glob-to-any-file: ['docs/**', 'book/**']
- changed-files:
- any-glob-to-any-file: ['docs/**', 'book/**']

# Add 'crate: common' label to any changes within 'common' folder.
'crate: common':
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
--- # Rust cargo audit workflow

name: Security audit
on:
push:
paths:
paths:
- '**/Cargo.toml'

jobs:
security_audit:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # MD Book generation and deployment workflow

name: zkEVM mdbook

on:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow with multiple jobs to test different parts of the project

name: Continuous Integration

on:
Expand Down Expand Up @@ -37,7 +39,11 @@ jobs:
- name: Test in mpt_trie subdirectory
run: cargo test --manifest-path mpt_trie/Cargo.toml
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
RUSTFLAGS: >
-Copt-level=3
-Cdebug-assertions
-Coverflow-checks=y
-Cdebuginfo=0
RUST_LOG: 1
CARGO_INCREMENTAL: 1
RUST_BACKTRACE: 1
Expand All @@ -63,7 +69,7 @@ jobs:
with:
cache-on-failure: true

- name: build # build separately so test logs are actually nice
- name: build # build separately so test logs are actually nice
run: cargo build --tests --manifest-path trace_decoder/Cargo.toml

- name: test
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow for building and running docker images as regression test

name: Docker Build & Run

on:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Workflow for building and deploying docker images

name: Docker Build & Push

on:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/jerigon-native.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Run and populate blockchain with transactions and generate proofs using native tracer

name: Jerigon Integration

on:
Expand Down Expand Up @@ -54,14 +56,15 @@ jobs:
sudo apt update
sudo apt install kurtosis-cli

#It is much easier to use cast tool in scripts so install foundry
# It is much easier to use cast tool in scripts so install foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run cancun test network
run: |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] \
--args-file jerigon-test-network/network_params.yml

- name: Generate blocks with transactions
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/jerigon-zero.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Run and populate blockchain with transactions and generate proofs using zero tracer

name: Jerigon Integration

on:
Expand Down Expand Up @@ -54,14 +56,15 @@ jobs:
sudo apt update
sudo apt install kurtosis-cli

#It is much easier to use cast tool in scripts so install foundry
# It is much easier to use cast tool in scripts so install foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run cancun test network
run: |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] \
--args-file jerigon-test-network/network_params.yml

- name: Generate blocks with transactions
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- # Add labels to the PR

name: "Pull Request Labeler"
on:
- pull_request_target
- pull_request_target

jobs:
labeler:
Expand All @@ -10,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/labeler@v5
with:
# Allow to remove labels that are no longer relevant when new changes are pushed.
sync-labels: true
- uses: actions/labeler@v5
with:
# Allow to remove labels that are no longer relevant when new changes are pushed.
sync-labels: true
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Rust lint related checks

name: lint

on:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pr_checking.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--- # Rust lint related checks

name: PR check

on:
Expand All @@ -14,15 +16,17 @@ jobs:
steps:
- name: Set up keywords
id: setup_keywords
run: echo "RESTRICTED_KEYWORDS=$(echo '${{ secrets.RESTRICTED_KEYWORDS }}' | jq -r '.[]' | tr '\n' ' ')" >> $GITHUB_ENV
run: >
echo "RESTRICTED_KEYWORDS=$(echo '${{ secrets.RESTRICTED_KEYWORDS }}'
| jq -r '.[]'
| tr '\n' ' ')" >> $GITHUB_ENV

- name: Check for spam PR
id: check
run: |
# Initialize variables to track spam presence
title_is_spam=false
description_is_spam=false

# Check title for spam
for keyword in $RESTRICTED_KEYWORDS; do
if echo "${{ github.event.pull_request.title }}" | grep -i -q "$keyword"; then
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- # Run yamllint on all YAML files in the repository

name: Yamllint
'on':
pull_request:
paths:
- '**/*.yml'
- '.github/**'
workflow_dispatch:
branches:
- '**'

jobs:
yamllint-check:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install yamllint
run: sudo apt-get install yamllint=1.26.3-1
- name: Run yamllint
run: >
yamllint
--format github
-d "{extends: default, rules: {line-length: {max: 120}, truthy: {check-keys: false}}}"
.github
Loading