Skip to content

Commit

Permalink
Merge pull request #1 from lensians/lensians-dao
Browse files Browse the repository at this point in the history
add lensians-dao
  • Loading branch information
random-potential authored Jan 7, 2025
2 parents 5df48da + 6ecd36e commit 3ca0dae
Show file tree
Hide file tree
Showing 1,427 changed files with 131,274 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'packages/*/tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
root: true,
env: {
node: true,
},
ignorePatterns: ['**/*.js', 'dist', '**/*.d.ts'],
};
18 changes: 18 additions & 0 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Artifact Upload

on:
push:
branches:
- img-permutator
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: upload-files
uses: google-github-actions/upload-cloud-storage@main
with:
credentials: ${{ secrets.GCLOUD_STORAGE_SERVICE_ACCOUNT }}
path: packages/nouns-img-permutator/assets/
destination: nounsdao.appspot.com/src-main/assets/
parent: false
34 changes: 34 additions & 0 deletions .github/workflows/bots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bots CI/CD

on:
push:
branches:
- master
pull_request:
paths:
- "packages/nouns-bots/**"
branches:
- "**"

jobs:
build_and_push:
name: Build and Push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GCR
uses: docker/login-action@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.CARROT_GCR_SA }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.bots
push: true
tags: gcr.io/nouns-infra/bots:${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
28 changes: 28 additions & 0 deletions .github/workflows/contract-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Contracts CD

on:
release:
types:
- created

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Yarn
run: npm install -g yarn
- run: yarn
- run: yarn build
- name: Run contract tests
run: |
cd packages/nouns-contracts
yarn test
- name: Uninstall Yarn
if: always()
run: npm uninstall -g yarn
55 changes: 55 additions & 0 deletions .github/workflows/contracts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Contracts CI

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
paths:
- 'packages/nouns-contracts/**'
- 'packages/nouns-subgraph/**'
branches:
- '**'

env:
NODE_OPTIONS: --max_old_space_size=5120

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Yarn
run: npm install -g yarn
- run: yarn
- run: yarn build
- name: Run contract tests
run: |
cd packages/nouns-contracts
yarn test
- name: Uninstall Yarn
if: always()
run: npm uninstall -g yarn
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
cd packages/nouns-contracts
forge --version
forge build --sizes
- name: Run Forge tests
run: |
cd packages/nouns-contracts
forge test -vvv --ffi
env:
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
29 changes: 29 additions & 0 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Node.js CI

on:
push:
branches:
- master
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- run: yarn
- run: yarn build
- name: Uninstall Yarn
if: always()
run: npm uninstall -g yarn
24 changes: 24 additions & 0 deletions .github/workflows/preview-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Preview Artifact Upload

on:
push:
branches:
# Match branches within the img-permutator/ path
# Double glob (**) matches a full path so even img-permutator/foo/bar would match
- 'img-permutator-preview/src-**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/img-permutator-preview/})"
id: extract_branch
- id: upload-files
uses: google-github-actions/upload-cloud-storage@main
with:
credentials: ${{ secrets.GCLOUD_STORAGE_SERVICE_ACCOUNT }}
path: packages/nouns-img-permutator/assets
destination: nounsdao.appspot.com/${{ steps.extract_branch.outputs.branch }}
parent: false
48 changes: 48 additions & 0 deletions .github/workflows/subgraph-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Subgraph CI

on:
push:
branches:
- master
pull_request:
paths:
- 'packages/nouns-contracts/abi/contracts/**'
- 'packages/nouns-subgraph/**'
branches:
- '**'

jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Yarn
run: npm install -g yarn
- run: yarn
- run: yarn build
- name: Prepare subgraph yaml
run: |
cd packages/nouns-subgraph
yarn prepare:rinkeby
- name: Generate code
run: |
cd packages/nouns-subgraph
yarn codegen
- name: Generate config
run: |
cd packages/nouns-subgraph
yarn test:configgen
- name: Run tests
run: |
cd packages/nouns-subgraph
yarn test
- name: Uninstall Yarn
if: always()
run: npm uninstall -g yarn
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
.vscode
# build/
dist
/**/sha.ts
/**/sha.h
*.tgz
.env
.DS_Store
*.tsbuildinfo
*.log
yarn.lock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/nouns-contracts/lib/forge-std"]
path = packages/nouns-contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
15 changes: 15 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"printWidth": 100,
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 120,
"bracketSpacing": true
}
}
]
}
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspaces-experimental true
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:16

WORKDIR /app

ADD lerna.json .
ADD package.json .
ADD yarn.lock .

# Build cache layer
RUN yarn --ignore-scripts

ADD . .

# Install any package specific dependencies
RUN yarn

WORKDIR /app/packages/nouns-bots

RUN yarn build

CMD [ "node", "/app/packages/nouns-bots/dist/index.js"]
Loading

0 comments on commit 3ca0dae

Please sign in to comment.