Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup repo #1

Merged
merged 7 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# How to submit a pull request

This document was modified from [grappafinance/cross-margin-engine](https://github.com/grappafinance/cross-margin-engine).

## Summary

Describe the changes made in your pull request here.

## Details

Any implementation detail worth pointing out, if any.

## Todo

Breakdown the progress of the PR for everyone to see what else you intend to include in this PR.

- [ ] Draft implementation for `function`
- [ ] Unit tests for `function`

## Checklist

Ensure you completed **all of the steps** below before submitting your pull request:

- [ ] Add [natspec](https://docs.soliditylang.org/en/latest/natspec-format.html) for all functions / parameters
- [ ] Ran `forge snapshot`
- [ ] Ran `forge fmt`
- [ ] Ran `forge test`
- [ ] [Triage Slither issues](../README.md#triage-issues), and post uncertain ones in the PR
63 changes: 63 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

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

env:
FOUNDRY_PROFILE: ci

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Run forge fmt
run: forge fmt --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Create .env file
uses: SpicyPizza/create-envfile@v1.3.0
with:
envkey_MNEMONIC: ${{ secrets.MNEMONIC }}
envkey_ALCHEMEY_KEY: ${{ secrets.ALCHEMEY_KEY }}
envkey_ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
file_name: .env
fail_on_empty: true

#- name: Run tests
# run: forge test --gas-report
#
#- name: Run Coverage
# run: forge coverage --report lcov
#
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# directory: .
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: ./lcov.info
# name: harvest-ul-mainnet-coverage
# verbose: true
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ docs/

# Dotenv file
.env

# Node modules
node_modules/
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run commitlint --edit "$1"
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"

forge fmt
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.formatter": "forge",
"solidity.compileUsingRemoteVersion": "v0.8.17"
}
26 changes: 26 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { UserConfig } from '@commitlint/types'

export const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"refactor",
"revert",
"style",
"test",
"gas", // extended: gas optimization
],
],
},
}

module.exports = Configuration
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "harvest-nonfungible-position-vault",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"private": false,
"scripts": {
"postinstall": "husky install",
"prepack": "pinst --disable",
"postpack": "pinst --enable"
},
"repository": {
"type": "git",
"url": "git+https://github.com/harvestfi/harvest-nonfungible-position-vault.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/harvestfi/harvest-nonfungible-position-vault/issues"
},
"homepage": "https://github.com/harvestfi/harvest-nonfungible-position-vault#readme",
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"husky": "^8.0.3",
"pinst": "^3.0.0"
}
}
Loading