Skip to content
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Build verification workflow
name: Build

on:
push:
branches: [main]
pull_request:
Comment thread
AnkushinDaniil marked this conversation as resolved.
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- src/Nethermind.Arbitrum/Nethermind.Arbitrum.csproj
- src/Nethermind.Arbitrum.Test/Nethermind.Arbitrum.Test.csproj

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore ${{ matrix.project }}

- name: Build
run: dotnet build ${{ matrix.project }} --configuration Release --no-restore
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DEPRECATED: This workflow is kept for backward compatibility with existing PRs
# New PRs should use the separate workflows: build.yml, format.yml, test.yml
# TODO: Remove after all open PRs are updated
Comment thread
AnkushinDaniil marked this conversation as resolved.
Comment thread
AnkushinDaniil marked this conversation as resolved.

name: Nethermind.Arbitrum CI & Coverage

on:
Expand Down Expand Up @@ -31,7 +35,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Build ${{ matrix.project }}
run: dotnet build ${{ matrix.project }} --configuration Release
Expand All @@ -51,7 +55,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Install dotnet-format
run: dotnet tool install -g dotnet-format
Expand All @@ -72,7 +76,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Run tests with Arbitrum-only coverage (Cobertura)
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Code format verification workflow
name: Format Check

on:
push:
branches: [main, develop]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
format:
name: Format Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- src/Nethermind.Arbitrum/Nethermind.Arbitrum.csproj
- src/Nethermind.Arbitrum.Test/Nethermind.Arbitrum.Test.csproj

steps:
- name: Checkout repository
uses: actions/checkout@v4
Comment thread
AnkushinDaniil marked this conversation as resolved.
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Check code format
run: dotnet format ${{ matrix.project }} --verify-no-changes
48 changes: 48 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: OpenSSF Scorecard

on:
push:
branches: [main]
workflow_dispatch:
Comment thread
AnkushinDaniil marked this conversation as resolved.

permissions: read-all

jobs:
analysis:
name: Scorecard Analysis
runs-on: ubuntu-latest
permissions:
# Needed for Code Scanning upload
security-events: write
# Needed for OIDC token generation for scorecard
id-token: write
# Needed for repo checkout
contents: read
# Needed for Dependency Submission API
actions: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Run Scorecard Analysis
uses: ossf/scorecard-action@ff5dd8929f96a8a4dc67d13f32b8c75057829621 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
# Publish results to OpenSSF REST API for public visibility
publish_results: true

- name: Upload Scorecard Results to GitHub Security Tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

- name: Upload Scorecard Results as Artifact
uses: actions/upload-artifact@v4
with:
name: scorecard-results
path: results.sarif
retention-days: 7
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Test and coverage workflow
# Uses XPlat Code Coverage (built-in) + Codecov for reporting
name: Test

on:
push:
branches: [main, develop]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Test with coverage
run: >
dotnet test src/Nethermind.Arbitrum.Test/Nethermind.Arbitrum.Test.csproj
--configuration Release
--collect:"XPlat Code Coverage"
--results-directory ./coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Include=[Nethermind.Arbitrum*]*

- name: Upload to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
fail_ci_if_error: false
Comment thread
AnkushinDaniil marked this conversation as resolved.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

# Nethermind Arbitrum Plugin

[![Build](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/build.yml/badge.svg)](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/build.yml)
[![Format Check](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/format.yml/badge.svg)](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/format.yml)
[![Test](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/test.yml/badge.svg)](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/test.yml)
[![OpenSSF Scorecard](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/scorecard.yml/badge.svg)](https://github.com/NethermindEth/nethermind-arbitrum/actions/workflows/scorecard.yml)
[![codecov](https://codecov.io/gh/NethermindEth/nethermind-arbitrum/branch/main/graph/badge.svg)](https://codecov.io/gh/NethermindEth/nethermind-arbitrum)
[![License: BSL-1.1](https://img.shields.io/badge/License-BSL%201.1-blue.svg)](LICENSE.md)

Nethermind Arbitrum Plugin enables execution layer functionality for Arbitrum rollups, providing client diversity for the Arbitrum ecosystem.
Expand Down
31 changes: 31 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Codecov configuration for nethermind-arbitrum
# https://docs.codecov.io/docs/codecovyml-reference

coverage:
status:
project:
default:
target: 60%
threshold: 2%
if_ci_failed: error
patch:
default:
target: 60%
threshold: 2%
if_ci_failed: error

comment:
layout: "header,diff,flags,files"
behavior: default
require_changes: false
require_base: false

# Ignore non-production code
ignore:
- "src/Nethermind/**" # Nethermind submodule (not our code)
- "**/*.Test/**" # Test projects
- "**/bin/**"
- "**/obj/**"
- "**/*.Designer.cs"
- "**/*.generated.cs"
- "**/Migrations/**"