Skip to content

Commit

Permalink
chore: create semaphore monorepo
Browse files Browse the repository at this point in the history
Former-commit-id: a38dd20
  • Loading branch information
cedoor committed Sep 16, 2022
1 parent ecca5a4 commit 8cf04dd
Show file tree
Hide file tree
Showing 128 changed files with 4,052 additions and 17,784 deletions.
19 changes: 16 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
{
"root": true,
"env": {
"es6": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"extends": ["airbnb-base", "airbnb-typescript/base", "plugin:jest/recommended", "plugin:jest/style", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
},
"plugins": ["@typescript-eslint"]
"plugins": ["@typescript-eslint", "jest"],
"rules": {
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": "off",
"no-bitwise": "off",
"no-await-in-loop": "off",
"no-restricted-syntax": "off",
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"@typescript-eslint/lines-between-class-members": "off",
"no-param-reassign": "off"
}
}
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/---package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "\U0001F4E6 Package"
about: Propose a new Semaphore package
title: ''
labels: 'feature :rocket:'
assignees: ''

---

**Describe the package you'd like**
A clear and concise description of the type of package you have in mind.

**Additional context**
Add any other context about the package here.
50 changes: 0 additions & 50 deletions .github/workflows/coverall.yml

This file was deleted.

23 changes: 12 additions & 11 deletions .github/workflows/style.yml → .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: style
name: docs

on:
pull_request:
push:
branches:
- main

jobs:
style:
gh-pages:
runs-on: ubuntu-latest

steps:
Expand All @@ -32,13 +31,15 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
run: YARN_CHECKSUM_BEHAVIOR=ignore yarn
run: yarn

- name: Run Prettier
run: yarn prettier
- name: Generate doc website
run: yarn docs

- name: Run Eslint
run: yarn lint

- name: Compile contracts
run: yarn compile
- name: Publish on Github Pages
uses: crazy-max/[email protected]
with:
build_dir: docs
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53 changes: 46 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
TREE_DEPTH: 20

jobs:
test:
install:
runs-on: ubuntu-latest

steps:
Expand All @@ -35,13 +35,52 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
run: YARN_CHECKSUM_BEHAVIOR=ignore yarn
run: yarn

style:
needs: install
runs-on: ubuntu-latest

steps:
- name: Run Prettier
run: yarn prettier

- name: Download Snark artifacts
run: yarn download:snark-artifacts
- name: Run Eslint
run: yarn lint

- name: Compile contracts
run: yarn compile
run: yarn compile:contracts

- name: Build libraries
run: yarn build:libs

test:
needs: style
runs-on: ubuntu-latest
strategy:
matrix:
type:
- libraries
- contracts

steps:
- name: Test contracts and libraries
run: yarn test:${{ matrix.type }}

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.type }}
path-to-lcov: ./coverage/${{ matrix.type }}/lcov.info
parallel: true

- name: Test contracts with coverage
run: yarn test:coverage
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ pids
*.seed
*.pid.lock

# IDE
.vscode
.idea

# Testing
coverage
coverage.json
*.lcov

# Dependency directories
node_modules/
Expand All @@ -28,6 +33,10 @@ node_modules/

# Optional npm cache directory
.npm
.DS_Store

# Output of 'npm pack'
*.tgz

# Optional eslint cache
.eslintcache
Expand Down Expand Up @@ -56,6 +65,9 @@ build
dist
deployed-contracts/undefined.json
deployed-contracts/localhost.json
docs/*
!docs/CNAME
!docs/index.html

# Hardhat
artifacts
Expand All @@ -72,3 +84,6 @@ cache
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Other
snark-artifacts
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ types
circuits

# contracts
contracts/verifiers
Verifier*.sol

# production
dist
Expand All @@ -35,3 +35,6 @@ build
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# other
snark-artifacts
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
nodeLinker: node-modules
checksumBehavior: update

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
Loading

0 comments on commit 8cf04dd

Please sign in to comment.