Skip to content

Commit

Permalink
add linter and tests to CI build (#37)
Browse files Browse the repository at this point in the history
* add linter + tests to CI build


Co-authored-by: Lint Action <[email protected]>
  • Loading branch information
ewilz and lint-action authored Nov 19, 2021
1 parent 1c9f1d3 commit 5a610ce
Show file tree
Hide file tree
Showing 34 changed files with 575 additions and 18,362 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint

on:
push:
branches:
- main
pull_request:

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm install

- name: Run linters
uses: wearerequired/lint-action@a8497ddb33fb1205941fd40452ca9fff07e0770d
with:
github_token: ${{ secrets.github_token }}
prettier: true
auto_fix: true
prettier_extensions: 'css,html,js,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml,sol'
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
push:
branches:
- main
pull_request:

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
registry-url: https://registry.npmjs.org

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install

# This is required separately from yarn test because it generates the typechain definitions
- name: Compile
run: npm run build

- name: Run unit tests
run: npm run test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# package.json is formatted by package managers, so we ignore it here
package.json
package.json
v2pools.json
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker"
]
}
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"outputCapture": "std",
"skipFiles": ["<node_internals>/**/*.js"]
// "smartStep": true
}]
}
]
}
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ All notable changes to this project will be documented in this file. See [standa

### [1.46.1](https://github.com/Uniswap/smart-order-router/compare/v1.45.1...v1.46.1) (2021-10-06)


### Bug Fixes

* move prettier-plugin-organize-imports and sinon to dev dependencies ([#18](https://github.com/Uniswap/smart-order-router/issues/18)) ([c9514cc](https://github.com/Uniswap/smart-order-router/commit/c9514cc8ba87b62aedf1402cfd8188fc59d4a363))
- move prettier-plugin-organize-imports and sinon to dev dependencies ([#18](https://github.com/Uniswap/smart-order-router/issues/18)) ([c9514cc](https://github.com/Uniswap/smart-order-router/commit/c9514cc8ba87b62aedf1402cfd8188fc59d4a363))

### [1.45.1](https://github.com/Uniswap/smart-order-router/compare/v1.44.1...v1.45.1) (2021-09-28)

Expand Down
Loading

0 comments on commit 5a610ce

Please sign in to comment.