Skip to content

Commit

Permalink
feat: add workflow for eslint and typescript check
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGross committed Nov 5, 2024
1 parent 8ad58a1 commit c766353
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:
# Make sure the actual branch is checked out when running on pull requests.
ref: ${{ github.head_ref }}
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Test
name: Eslint check

on:
push:
Expand All @@ -20,17 +20,12 @@ jobs:
ref: ${{ github.head_ref }}
fetch-depth: 0 # 👈 Required to retrieve git history

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build
- name: Lint Javascripts
run: yarn lint
31 changes: 31 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Type check

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests.
ref: ${{ github.head_ref }}
fetch-depth: 0 # 👈 Required to retrieve git history

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install dependencies
run: yarn install

- name: Run typescript compile check
run: npx tsc --noEmit
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"node_modules",
"lib/rest/cover-service-api/model",
"lib/rest/cover-service-api/cover-service.ts",
"lib/graphql/generated/fbi/*.tsx"
"lib/graphql/generated/fbi/*.tsx",
"__tests__"
]
}

0 comments on commit c766353

Please sign in to comment.