Skip to content

Commit

Permalink
build: include type checking in CI test (#182)
Browse files Browse the repository at this point in the history
* build: check as part of tests

* build: check all src files

* build: name job test

Co-authored-by: Jordan Frankfurt <[email protected]>
  • Loading branch information
zzmp and JFrankfurt authored Aug 30, 2022
1 parent fe7173c commit 085c46e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 42 deletions.
21 changes: 21 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup
runs:
using: composite
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: yarn

- uses: actions/cache@v3
id: install-cache
with:
path: node_modules/
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}

- if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts
shell: bash
9 changes: 1 addition & 8 deletions .github/workflows/crowdin-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://registry.npmjs.org
cache: 'yarn'

- run: yarn install --frozen-lockfile --ignore-scripts
- uses: ./.github/actions/setup

- run: yarn i18n:extract

Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/crowdin-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://registry.npmjs.org
cache: 'yarn'

- run: yarn install --frozen-lockfile --ignore-scripts
- uses: ./.github/actions/setup

- run: yarn i18n:extract

Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: 'yarn'

- run: yarn install --frozen-lockfile --ignore-scripts
- uses: ./.github/actions/setup

- uses: wearerequired/lint-action@v2
with:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: 'yarn'

- run: yarn install --frozen-lockfile
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn test
if: success()
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,27 @@ on:
pull_request:
branches:
- main
# manual trigger
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: 'yarn'

- run: yarn install --frozen-lockfile
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn test

- run: yarn test:e2e
env:
JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }}

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn typecheck
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"prepare": "yarn contracts:compile && yarn i18n:compile && yarn ajv:compile",
"prepublishOnly": "yarn build",
"start": "cosmos",
"build": "tsc -p tsconfig.build.json && rollup --config --failAfterWarnings",
"typecheck": "tsc -p tsconfig.json",
"prebuild": "tsc -p tsconfig.build.json",
"build": "rollup --config --failAfterWarnings",
"release": "semantic-release",
"lint": "eslint .",
"test": "jest src",
Expand Down

1 comment on commit 085c46e

@vercel
Copy link

@vercel vercel bot commented on 085c46e Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

widgets – ./

widgets-git-main-uniswap.vercel.app
widgets-uniswap.vercel.app
widgets-seven-tau.vercel.app

Please sign in to comment.