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
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Run tests
name: protocol-contracts-confidential-wrapper-tests

on:
pull_request:

push:
branches:
- main
workflow_dispatch:

permissions: {}

concurrency:
group: ci-protocol-contracts-confidential-wrapper-tests-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-changes:
name: protocol-contracts-confidential-wrapper-tests/check-changes
permissions:
actions: 'read' # Required to read workflow run information
contents: 'read' # Required to checkout repository code
pull-requests: 'read' # Required to read pull request information
runs-on: ubuntu-latest
outputs:
changes-protocol-contracts-confidential-wrapper: ${{ steps.filter.outputs.protocol-contracts-confidential-wrapper }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
protocol-contracts-confidential-wrapper:
- .github/workflows/protocol-contracts-confidential-wrapper-tests.yml
- protocol-contracts/staking/**
tests:
name: protocol-contracts-confidential-wrapper-tests/tests (bpr)
needs: check-changes
# if: ${{ needs.check-changes.outputs.changes-protocol-contracts-confidential-wrapper == 'true' }}
# TODO: Re-enable this once the tests are fixed
# See https://github.com/zama-ai/fhevm-internal/issues/796
if: false
runs-on: ubuntu-latest
permissions:
contents: 'read' # Required to checkout repository code
steps:
- name: Checkout project
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'

- name: Install dependencies
working-directory: protocol-contracts/confidential-wrapper
run: npm ci

- name: Run lint
working-directory: protocol-contracts/confidential-wrapper
run: npm run lint

- name: Run compile
working-directory: protocol-contracts/confidential-wrapper
run: npm run compile

- name: Run build:ts
working-directory: protocol-contracts/confidential-wrapper
run: npm run build:ts

- name: Run unit tests
working-directory: protocol-contracts/confidential-wrapper
run: make test

- name: Run coverage
working-directory: protocol-contracts/confidential-wrapper
run: make run coverage
11 changes: 10 additions & 1 deletion .github/workflows/protocol-contracts-staking-hardhat-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
push:
branches:
- main
workflow_dispatch:

permissions: {}

concurrency:
group: ci-tests-${{ github.ref }}
group: ci-protocol-contracts-staking-tests-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
Expand Down Expand Up @@ -52,6 +53,14 @@ jobs:
working-directory: protocol-contracts/staking
run: npm ci

- name: Run lint
working-directory: protocol-contracts/staking
run: npm run lint

- name: Run compile
working-directory: protocol-contracts/staking
run: npm run compile

- name: Run unit tests
working-directory: protocol-contracts/staking
run: make test
Expand Down
26 changes: 26 additions & 0 deletions protocol-contracts/confidential-wrapper/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# fhevm
fhevmTemp
tmp

# directories
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage
dist
node_modules
types

# files
*.env
*.log
.DS_Store
.pnp.*
bun.lockb
coverage.json
package-lock.json
pnpm-lock.yaml
yarn.lock
21 changes: 21 additions & 0 deletions protocol-contracts/confidential-wrapper/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
- "prettier"
parser: "@typescript-eslint/parser"
parserOptions:
project: "tsconfig.json"
plugins:
- "@typescript-eslint"
root: true
rules:
"@typescript-eslint/no-floating-promises":
- error
- ignoreIIFE: true
ignoreVoid: true
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: "_"
varsIgnorePattern: "_"
25 changes: 25 additions & 0 deletions protocol-contracts/confidential-wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# fhevm
fhevmTemp

# directories
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage
dist
node_modules
types
deployments
tmp

# files
*.env
*.log
.DS_Store
.pnp.*
coverage.json
pnpm-lock.yaml
yarn.lock
25 changes: 25 additions & 0 deletions protocol-contracts/confidential-wrapper/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# fhevm
fhevmTemp

# directories
.coverage_artifacts
.coverage_cache
.coverage_contracts
artifacts
build
cache
coverage
dist
node_modules
types

# files
*.env
*.log
.DS_Store
.pnp.*
bun.lockb
coverage.json
package-lock.json
pnpm-lock.yaml
yarn.lock
21 changes: 21 additions & 0 deletions protocol-contracts/confidential-wrapper/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins:
- "prettier-plugin-solidity"
printWidth: 120
trailingComma: "all"

overrides:
- files: "*.md"
options:
proseWrap: "always"
- files: "*.sol"
options:
compiler: "0.8.24"
parser: "solidity-parse"
tabWidth: 4
- files: "*.ts"
options:
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
importOrderParserPlugins: ["typescript"]
importOrderSeparation: true
importOrderSortSpecifiers: true
parser: "typescript"
4 changes: 4 additions & 0 deletions protocol-contracts/confidential-wrapper/.solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
istanbulReporter: ["html", "lcov"],
skipFiles: ["test"],
};
19 changes: 19 additions & 0 deletions protocol-contracts/confidential-wrapper/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.8.4"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"named-parameters-mapping": "warn",
"no-console": "off",
"not-rely-on-time": "off",
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
}
3 changes: 3 additions & 0 deletions protocol-contracts/confidential-wrapper/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# directories
**/artifacts
**/node_modules
Loading