-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
165 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Core | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "core/**" | ||
pull_request: | ||
|
||
defaults: | ||
run: | ||
working-directory: ./core | ||
|
||
jobs: | ||
core-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "core/.nvmrc" | ||
cache: "yarn" | ||
cache-dependency-path: "core/yarn.lock" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile | ||
|
||
- name: Format | ||
run: yarn format | ||
|
||
core-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "core/.nvmrc" | ||
cache: "yarn" | ||
cache-dependency-path: "core/yarn.lock" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: core-build | ||
path: | | ||
core/build/ | ||
core/typechain/ | ||
if-no-files-found: error | ||
|
||
core-test: | ||
needs: [core-build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "core/.nvmrc" | ||
cache: "yarn" | ||
cache-dependency-path: "core/yarn.lock" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile | ||
|
||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: core-build | ||
path: core/ | ||
|
||
- name: Test | ||
run: yarn test --no-compile | ||
|
||
core-deploy-dry-run: | ||
needs: [core-build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "core/.nvmrc" | ||
cache: "yarn" | ||
cache-dependency-path: "core/yarn.lock" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile | ||
|
||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: core-build | ||
path: core/ | ||
|
||
- name: Deploy | ||
run: yarn deploy --no-compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: lint-sol | ||
name: "lint core sol" | ||
entry: /usr/bin/env bash -c "cd core/ && npm run lint:sol" | ||
files: '\.sol$' | ||
language: script | ||
description: "Checks solidity code according to the package's linter configuration" | ||
- id: lint-js | ||
name: "lint core ts/js" | ||
entry: /usr/bin/env bash -c "cd core/ && npm run lint:js" | ||
files: '\.(ts|js)$' | ||
language: script | ||
description: "Checks TS/JS code according to the package's linter configuration" | ||
- id: lint-config | ||
name: "lint core json/yaml" | ||
entry: /usr/bin/env bash -c "cd core/ && npm run lint:config" | ||
files: '\.(json|yaml)$' | ||
language: script | ||
description: "Checks JSON/YAML code according to the package's linter configuration" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"eslint.workingDirectories": [ | ||
"./core/", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,24 @@ | ||
# litmus | ||
# Acre | ||
|
||
Bitcoin Liquid Staking | ||
|
||
[![Core](https://github.com/thesis/acre/actions/workflows/core.yaml/badge.svg?branch=main&event=push)](https://github.com/thesis/acre/actions/workflows/core.yaml) | ||
|
||
## Development | ||
|
||
### Pre-commit Hooks | ||
|
||
Developers are encouraged to use [pre-commit](https://pre-commit.com/) hooks to | ||
automatically discover code issues, before they submit the code. | ||
|
||
To setup the hooks follow the steps: | ||
|
||
1. Install `pre-commit` tool: | ||
```sh | ||
brew install pre-commit | ||
``` | ||
|
||
2. Install the hooks for the repository: | ||
```sh | ||
pre-commit install | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/iron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Litmus | ||
# Acre | ||
|
||
Litmus is a “liquid staking” solution that allows people to earn yield on their Bitcoin via yield farming on Ethereum. | ||
Acre is a “liquid staking” solution that allows people to earn yield on their Bitcoin via yield farming on Ethereum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters