Skip to content

Commit

Permalink
chore: convert repo into a yarn workspaces monorepo
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone committed Nov 28, 2023
1 parent e00c6f9 commit c31b1b1
Show file tree
Hide file tree
Showing 361 changed files with 19,683 additions and 15,102 deletions.
24 changes: 24 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup

runs:
using: composite

strategy:
matrix:
node-version: [16.x]

steps:
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache
uses: actions/cache@v3
id: cache
with:
path: '**/node_modules'
key: yarn-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn --immutable
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: Run CI tests
name: [contracts] Run CI tests

env:
CI: true

on:
push:
branches: [main]
paths:
- packages/contracts/**
pull_request: {}


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

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: yarn install --non-interactive --frozen-lockfile
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Run tests
run: yarn test:coverage
- name: Upload coverage report
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
name: Run E2E tests
name: [contracts] Run E2E tests

env:
CI: true

on:
push:
branches: [main]
paths:
- contracts/**
- config/**
- e2e/**
- cli/**
- tasks/**
- scripts/**
- hardhat.config.ts
- packages/contracts/contracts/**
- packages/contracts/config/**
- packages/contracts/e2e/**
- packages/contracts/cli/**
- packages/contracts/tasks/**
- packages/contracts/scripts/**
- packages/contracts/hardhat.config.ts
pull_request: {}

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: yarn install --non-interactive --frozen-lockfile
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Run e2e tests
run: |
git clone https://github.com/edgeandnode/nitro
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/npmpublish.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/verifydeployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ jobs:
name: Compile contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn install --non-interactive --frozen-lockfile
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup

- name: Compile contracts
run: yarn build
Expand All @@ -46,12 +44,10 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: yarn install --non-interactive --frozen-lockfile
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Get build artifacts
uses: actions/download-artifact@v3
with:
Expand Down
26 changes: 20 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Logs
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Ignore build stuff
cache/
build/
dist/
# Yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# Hardhat cache
# Hardhat artifacts
artifacts/
cache/
cached/

# Build artifacts
dist/
build/

# Ignore solc bin output
bin/

Expand All @@ -28,4 +42,4 @@ tx-*.log
addresses-fork.json

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

# contracts
cd packages/contracts
npx --no-install lint-staged
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading

0 comments on commit c31b1b1

Please sign in to comment.