Skip to content

Commit

Permalink
Setup repo and CI
Browse files Browse the repository at this point in the history
* Setup and test CI

* Fix new line

* Lock node version

* Fix new line and add PR template

* Address feedback

* Remove unused files
  • Loading branch information
circle-aloychan committed Oct 19, 2023
1 parent 0d3cab1 commit ed7b130
Show file tree
Hide file tree
Showing 20 changed files with 198 additions and 232 deletions.
15 changes: 0 additions & 15 deletions .githooks/pre-commit

This file was deleted.

11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Summary

## Detail

## Testing

## Documentation

---

**Requested Reviewers:** @mention
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous Integration
on:
pull_request:

jobs:
run_ci_tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "16.14.0"

- name: Install Yarn
run: npm install -g [email protected]

- name: Install packages
run: yarn install --frozen-lockfile

- name: Setup local environment
run: cp config.js.example config.js && ./start-ganache.sh

- name: Run tests
run: yarn test
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ validate/apikey.infura
ganache-blockchain-log.txt
.coverage_artifacts
.coverage_contracts
yarn-error.log
@types/generated/
config.js

# Yarn & Node Modules
yarn-error.log
node_modules/

logs/
pids/
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"

yarn precommit
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.14.0
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"files.exclude": {
"**/.DS_Store": true,
"**/node_modules/": true
},
"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "node_modules",
"solidity.formatter": "none",
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile.ganache

This file was deleted.

8 changes: 0 additions & 8 deletions Dockerfile.truffle

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Requirements:
```
$ git clone [email protected]:centrehq/centre-tokens.git
$ cd centre-tokens
$ npm i -g yarn # Install yarn if you don't already have it
$ yarn install # Install dependencies
$ yarn setup # Setup Git hooks
$ nvm use
$ npm i -g [email protected] # Install yarn if you don't already have it
$ yarn install # Install dependencies
```

## TypeScript type definition files for the contracts
Expand Down
10 changes: 0 additions & 10 deletions build-dev.sh

This file was deleted.

28 changes: 0 additions & 28 deletions buildspec.yaml

This file was deleted.

106 changes: 0 additions & 106 deletions ci/codebuild.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions docker-compose.yml

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "test"
},
"scripts": {
"setup": "git config core.hooksPath .githooks",
"prepare": "husky install",
"compile": "truffle compile",
"typechain": "yarn compile && rm -rf './@types/generated' && typechain --target=truffle-v5 --outDir './@types/generated' 'build/contracts/**/*.json'",
"typecheck": "tsc -p . --noEmit",
Expand Down Expand Up @@ -58,6 +58,7 @@
"ethereumjs-util": "^7.0.3",
"ganache-cli": "^6.12.2",
"googleapis": "^55.0.0",
"husky": "^8.0.3",
"lodash": "^4.17.19",
"prettier": "2.0.5",
"prettier-plugin-solidity": "1.0.0-alpha.54",
Expand All @@ -72,7 +73,7 @@
"web3": "^1.2.11"
},
"engines": {
"node": ">= 12.0.0",
"yarn": ">= 1.21.1"
"node": "16.14.0",
"yarn": "1.22.19"
}
}
7 changes: 0 additions & 7 deletions scripts/verify-environment.sh

This file was deleted.

Loading

0 comments on commit ed7b130

Please sign in to comment.