Skip to content

Commit

Permalink
Migrate to turborepo
Browse files Browse the repository at this point in the history
  • Loading branch information
sembrestels committed Jun 25, 2024
1 parent d552a56 commit 7cede20
Show file tree
Hide file tree
Showing 326 changed files with 6,324 additions and 23,251 deletions.
13 changes: 0 additions & 13 deletions .config/bundlewatch.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions .config/husky/pre-commit

This file was deleted.

69 changes: 0 additions & 69 deletions .eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/index.js"],
};
64 changes: 21 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,66 +14,44 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
pnpm-version: [7.19.x]
node-version: [18.x]
bun-version: [1.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
- uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
version: ${{ matrix.pnpm-version }}
bun-version: latest
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}
- name: Cache pnpm
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: pnpm-
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
packages/**/dist
key: modules-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: pnpm i
run: bun i

- name: Get changed files from evmcrispr
id: changed-files
uses: tj-actions/changed-files@v20
uses: tj-actions/changed-files@v44
with:
files: 'packages/evmcrispr/src/**'
files: "packages/evmcrispr/{src,test}/**"

- name: Link Dependencies
if: steps.cache-node-modules.outputs.cache-hit == 'true'
run: pnpm dev
- name: Build
run: bun run build

- name: Lint code
run: pnpm lint
run: bun lint

- name: Check evmcrispr types
run: pnpm lint:evmcrispr:types

- name: Build
run: pnpm build

- name: Check size
run: pnpm size
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_BRANCH_BASE: master
run: bun type-check

- name: Tests
if: steps.changed-files.outputs.any_changed == 'true'
run: pnpm test:coverage
run: |
echo "ARCHIVE_NODE_ENDPOINT=${{ secrets.ARCHIVE_NODE_ENDPOINT }}" >> packages/evmcrispr/.env
echo "VITE_PINATA_JWT=${{ secrets.VITE_PINATA_JWT }}" >> packages/evmcrispr/.env
echo "ETHERSCAN_API=${{ secrets.ETHERSCAN_API }}" >> packages/evmcrispr/.env
bun test:coverage
env:
ARCHIVE_NODE_ENDPOINT: ${{ secrets.ARCHIVE_NODE_ENDPOINT }}
VITE_PINATA_JWT: ${{ secrets.VITE_PINATA_JWT }}
Expand All @@ -85,5 +63,5 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.os}}-node-${{ matrix.node-version }}
base-path: 'packages/evmcrispr'
path-to-lcov: 'packages/evmcrispr/coverage/lcov.info'
base-path: "packages/evmcrispr"
path-to-lcov: "packages/evmcrispr/coverage/lcov.info"
39 changes: 0 additions & 39 deletions .github/workflows/docs.yml

This file was deleted.

19 changes: 8 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master]
paths:
- 'packages/evmcrispr/**'
- "packages/evmcrispr/**"

jobs:
release:
Expand All @@ -13,35 +13,32 @@ jobs:
strategy:
matrix:
node-version: [16.x]
pnpm-version: [7.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
- uses: oven-sh/setup-bun@v1

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache: "bun"
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: pnpm i
run: bun i

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: 'chore: version packages'
commit: 'chore: version packages'
version: pnpm changeset:version
publish: pnpm changeset:release
title: "chore: version packages"
commit: "chore: version packages"
version: bun changeset:version
publish: bun changeset:release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55 changes: 11 additions & 44 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,14 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

node_modules
package-lock.json
yarn.lock

.pnp
.pnp.js

./artifacts
deployments
cache
typechain

*.txt
tenderly.yaml

.eslintcache

# compilation output
dist/

# testing
coverage
coverage.json

# production
build

# misc
.DS_Store
node_modules
.turbo
*.log
dist
dist-ssr
*.local
.env

# debug
.pnpm-debug.log

.idea

# github actions local tester
act.secrets

.cache
server/dist
public/dist
.nyc_output

tsconfig.tsbuildinfo

# typedocs
docs
cache
coverage
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

bunx lint-staged
1 change: 1 addition & 0 deletions .pretierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@repo/prettier-config"
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "always"
},
"eslint.options": {
"extensions": [".js", ".ts", ".tsx"]
},
"eslint.validate": ["javascript", "typescript", "typescriptreact"],
"eslint.packageManager": "pnpm",
"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "packages/hardhat/node_modules",
"solidity.enabledAsYouTypeCompilationErrorCheck": true,
Expand Down
Loading

0 comments on commit 7cede20

Please sign in to comment.