Skip to content

Commit 8cf04dd

Browse files
committed
chore: create semaphore monorepo
Former-commit-id: a38dd20
1 parent ecca5a4 commit 8cf04dd

File tree

128 files changed

+4052
-17784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+4052
-17784
lines changed

.eslintrc.json

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
{
2+
"root": true,
23
"env": {
34
"es6": true
45
},
5-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
6+
"extends": ["airbnb-base", "airbnb-typescript/base", "plugin:jest/recommended", "plugin:jest/style", "prettier"],
67
"parser": "@typescript-eslint/parser",
78
"parserOptions": {
8-
"project": "tsconfig.json"
9+
"ecmaVersion": 6,
10+
"sourceType": "module",
11+
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
912
},
10-
"plugins": ["@typescript-eslint"]
13+
"plugins": ["@typescript-eslint", "jest"],
14+
"rules": {
15+
"no-underscore-dangle": "off",
16+
"import/no-extraneous-dependencies": "off",
17+
"no-bitwise": "off",
18+
"no-await-in-loop": "off",
19+
"no-restricted-syntax": "off",
20+
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
21+
"@typescript-eslint/lines-between-class-members": "off",
22+
"no-param-reassign": "off"
23+
}
1124
}

.github/ISSUE_TEMPLATE/---package.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "\U0001F4E6 Package"
3+
about: Propose a new Semaphore package
4+
title: ''
5+
labels: 'feature :rocket:'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the package you'd like**
11+
A clear and concise description of the type of package you have in mind.
12+
13+
**Additional context**
14+
Add any other context about the package here.

.github/workflows/coverall.yml

-50
This file was deleted.

.github/workflows/style.yml renamed to .github/workflows/docs.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
name: style
1+
name: docs
22

33
on:
4-
pull_request:
54
push:
65
branches:
76
- main
87

98
jobs:
10-
style:
9+
gh-pages:
1110
runs-on: ubuntu-latest
1211

1312
steps:
@@ -32,13 +31,15 @@ jobs:
3231
${{ runner.os }}-yarn-
3332
3433
- name: Install dependencies
35-
run: YARN_CHECKSUM_BEHAVIOR=ignore yarn
34+
run: yarn
3635

37-
- name: Run Prettier
38-
run: yarn prettier
36+
- name: Generate doc website
37+
run: yarn docs
3938

40-
- name: Run Eslint
41-
run: yarn lint
42-
43-
- name: Compile contracts
44-
run: yarn compile
39+
- name: Publish on Github Pages
40+
uses: crazy-max/[email protected]
41+
with:
42+
build_dir: docs
43+
jekyll: false
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

+46-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
TREE_DEPTH: 20
1111

1212
jobs:
13-
test:
13+
install:
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -35,13 +35,52 @@ jobs:
3535
${{ runner.os }}-yarn-
3636
3737
- name: Install dependencies
38-
run: YARN_CHECKSUM_BEHAVIOR=ignore yarn
38+
run: yarn
39+
40+
style:
41+
needs: install
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Run Prettier
46+
run: yarn prettier
3947

40-
- name: Download Snark artifacts
41-
run: yarn download:snark-artifacts
48+
- name: Run Eslint
49+
run: yarn lint
4250

4351
- name: Compile contracts
44-
run: yarn compile
52+
run: yarn compile:contracts
53+
54+
- name: Build libraries
55+
run: yarn build:libs
56+
57+
test:
58+
needs: style
59+
runs-on: ubuntu-latest
60+
strategy:
61+
matrix:
62+
type:
63+
- libraries
64+
- contracts
65+
66+
steps:
67+
- name: Test contracts and libraries
68+
run: yarn test:${{ matrix.type }}
69+
70+
- name: Coveralls
71+
uses: coverallsapp/github-action@master
72+
with:
73+
github-token: ${{ secrets.GITHUB_TOKEN }}
74+
flag-name: run-${{ matrix.type }}
75+
path-to-lcov: ./coverage/${{ matrix.type }}/lcov.info
76+
parallel: true
4577

46-
- name: Test contracts with coverage
47-
run: yarn test:coverage
78+
finish:
79+
needs: test
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Coveralls Finished
83+
uses: coverallsapp/github-action@master
84+
with:
85+
github-token: ${{ secrets.GITHUB_TOKEN }}
86+
parallel-finished: true

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ pids
1616
*.seed
1717
*.pid.lock
1818

19+
# IDE
20+
.vscode
21+
.idea
22+
1923
# Testing
2024
coverage
2125
coverage.json
26+
*.lcov
2227

2328
# Dependency directories
2429
node_modules/
@@ -28,6 +33,10 @@ node_modules/
2833

2934
# Optional npm cache directory
3035
.npm
36+
.DS_Store
37+
38+
# Output of 'npm pack'
39+
*.tgz
3140

3241
# Optional eslint cache
3342
.eslintcache
@@ -56,6 +65,9 @@ build
5665
dist
5766
deployed-contracts/undefined.json
5867
deployed-contracts/localhost.json
68+
docs/*
69+
!docs/CNAME
70+
!docs/index.html
5971

6072
# Hardhat
6173
artifacts
@@ -72,3 +84,6 @@ cache
7284
!.yarn/releases
7385
!.yarn/sdks
7486
!.yarn/versions
87+
88+
# Other
89+
snark-artifacts

.prettierignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ types
1818
circuits
1919

2020
# contracts
21-
contracts/verifiers
21+
Verifier*.sol
2222

2323
# production
2424
dist
@@ -35,3 +35,6 @@ build
3535
npm-debug.log*
3636
yarn-debug.log*
3737
yarn-error.log*
38+
39+
# other
40+
snark-artifacts

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

+28
Large diffs are not rendered by default.

.yarnrc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
nodeLinker: node-modules
22
checksumBehavior: update
33

4+
plugins:
5+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
6+
spec: "@yarnpkg/plugin-workspace-tools"
7+
48
yarnPath: .yarn/releases/yarn-3.2.1.cjs

0 commit comments

Comments
 (0)