Skip to content

Commit

Permalink
Merge branch 'feat/vaults' into feat/vaults-develop-sync
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/analyse.yml
#	.github/workflows/coverage.yml
#	.github/workflows/tests-integration-holesky-devnet-0.yml
#	.github/workflows/tests-integration-scratch.yml
#	package.json
#	yarn.lock
  • Loading branch information
tamtamchik committed Nov 27, 2024
2 parents 6f8c01c + 6286561 commit e14f443
Show file tree
Hide file tree
Showing 13 changed files with 152 additions and 178 deletions.
115 changes: 58 additions & 57 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,59 @@
name: Analysis
#on: [pull_request]
#
#jobs:
# slither:
# name: Slither
# runs-on: ubuntu-latest
#
# permissions:
# contents: read
# security-events: write
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# - name: Install poetry
# run: pipx install poetry
#
# - uses: actions/setup-python@v5
# with:
# python-version: "3.12"
# cache: "poetry"
#
# - name: Install dependencies
# run: poetry install --no-root
#
# - name: Versions
# run: >
# poetry --version &&
# python --version &&
# echo "slither $(poetry run slither --version)" &&
# poetry run slitherin --version
#
# - name: Run slither
# run: >
# poetry run slither . \
# --no-fail-pedantic \
# --compile-force-framework hardhat \
# --sarif results.sarif \
# --exclude pess-strange-setter,pess-arbitrary-call-calldata-tainted
#
# - name: Check results.sarif presence
# id: results
# if: always()
# shell: bash
# run: >
# test -f results.sarif &&
# echo 'value=present' >> $GITHUB_OUTPUT ||
# echo 'value=not' >> $GITHUB_OUTPUT
#
# - name: Upload results.sarif file
# uses: github/codeql-action/upload-sarif@v3
# if: ${{ always() && steps.results.outputs.value == 'present' }}
# with:
# sarif_file: results.sarif

on: [pull_request]

jobs:
slither:
name: Slither
runs-on: ubuntu-latest

permissions:
contents: read
security-events: write

steps:
- uses: actions/checkout@v4

- name: Common setup
uses: ./.github/workflows/setup

- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- name: Install dependencies
run: poetry install --no-root

- name: Versions
run: >
poetry --version &&
python --version &&
echo "slither $(poetry run slither --version)" &&
poetry run slitherin --version
- name: Run slither
run: >
poetry run slither . \
--no-fail-pedantic \
--compile-force-framework hardhat \
--sarif results.sarif \
--exclude pess-strange-setter,pess-arbitrary-call-calldata-tainted
- name: Check results.sarif presence
id: results
if: always()
shell: bash
run: >
test -f results.sarif &&
echo 'value=present' >> $GITHUB_OUTPUT ||
echo 'value=not' >> $GITHUB_OUTPUT
- name: Upload results.sarif file
uses: github/codeql-action/upload-sarif@v3
if: ${{ always() && steps.results.outputs.value == 'present' }}
with:
sarif_file: results.sarif
79 changes: 40 additions & 39 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
name: Coverage
#on:
# pull_request:
# push:
# branches: [ master ]
#
#jobs:
# coverage:
# name: Hardhat
# runs-on: ubuntu-latest
#
# permissions:
# contents: write
# issues: write
# pull-requests: write
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Common setup
# uses: ./.github/workflows/setup
#
# # Remove the integration tests from the test suite, as they require a mainnet fork to run properly
# - name: Remove integration tests
# run: rm -rf test/integration
#
# - name: Collect coverage
# run: yarn test:coverage
#
# - name: Produce the coverage report
# uses: insightsengineering/coverage-action@v2
# with:
# path: ./coverage/cobertura-coverage.xml
# publish: true
# threshold: 95
# diff: true
# diff-branch: master
# diff-storage: _core_coverage_reports
# coverage-summary-title: "Hardhat Unit Tests Coverage Summary"
# togglable-report: true

on:
pull_request:
push:
branches: [master]

jobs:
coverage:
name: Hardhat
runs-on: ubuntu-latest

permissions:
contents: write
issues: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Common setup
uses: ./.github/workflows/setup

# Remove the integration tests from the test suite, as they require a mainnet fork to run properly
- name: Remove integration tests
run: rm -rf test/integration

- name: Collect coverage
run: yarn test:coverage

- name: Produce the coverage report
uses: insightsengineering/coverage-action@v2
with:
path: ./coverage/cobertura-coverage.xml
publish: true
threshold: 95
diff: true
diff-branch: master
diff-storage: _core_coverage_reports
coverage-summary-title: "Hardhat Unit Tests Coverage Summary"
togglable-report: true
30 changes: 0 additions & 30 deletions .github/workflows/tests-integration-holesky-devnet-0.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests-integration-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Integration Tests
#
# services:
# hardhat-node:
# image: ghcr.io/lidofinance/hardhat-node:2.22.12
# image: ghcr.io/lidofinance/hardhat-node:2.22.16
# ports:
# - 8545:8545
# env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-integration-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

services:
hardhat-node:
image: ghcr.io/lidofinance/hardhat-node:2.22.12-scratch
image: ghcr.io/lidofinance/hardhat-node:2.22.16-scratch
ports:
- 8555:8545

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12
22.11
1 change: 1 addition & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ module.exports = {
// Skip contracts that are tested by Foundry tests
"common/lib", // 100% covered by test/common/*.t.sol
"0.8.9/lib/UnstructuredStorage.sol", // 100% covered by test/0.8.9/unstructuredStorage.t.sol
"openzeppelin",
],
};
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ the [Lido Research Forum](https://research.lido.fi/).

### Requirements

- [Node.js](https://nodejs.org/en) version 20 (LTS) with `corepack` enabled
- [Node.js](https://nodejs.org/en) version 22 (LTS) with `corepack` enabled
- [Yarn](https://yarnpkg.com/) installed via corepack (see below)
- [Foundry](https://book.getfoundry.sh/) latest available version

Expand Down
Loading

0 comments on commit e14f443

Please sign in to comment.