Skip to content

Commit

Permalink
Refactor lint/typecheck actions (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
markspolakovs authored Sep 5, 2023
1 parent fc0d4ad commit 49fdbda
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 79 deletions.
66 changes: 2 additions & 64 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- run: yarn prettier --check '{desktop,jobrunner,server}/**/*.{ts,tsx}'

lint-desktop:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -34,39 +34,8 @@ jobs:
- run: yarn install --immutable --inline-builds

- run: yarn lint
working-directory: ./desktop

lint-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: "yarn.lock"
- run: yarn install --immutable --inline-builds

- run: yarn lint
working-directory: ./server

lint-jobrunner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: "yarn.lock"
- run: yarn install --immutable --inline-builds

- run: yarn lint
working-directory: ./jobrunner

typecheck-desktop:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -79,37 +48,6 @@ jobs:
- run: yarn install --immutable --inline-builds

- run: yarn typecheck
working-directory: ./desktop

typecheck-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: "yarn.lock"
- run: yarn install --immutable --inline-builds

- run: yarn typecheck
working-directory: ./server

typecheck-jobrunner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: "yarn.lock"
- run: yarn install --immutable --inline-builds

- run: yarn typecheck
working-directory: ./jobrunner

test-unit:
runs-on: ubuntu-latest
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "bowser-root-workspace",
"private": true,
"workspaces": [
"./server",
Expand All @@ -14,9 +15,10 @@
"prettier": "^3.0.3"
},
"scripts": {
"lint": "yarn workspaces foreach run lint",
"prettify": "yarn workspaces foreach run prettify",
"test": "yarn workspaces foreach run test",
"lint": "yarn workspaces foreach -p --exclude bowser-root-workspace run lint",
"prettify": "yarn workspaces foreach -p --exclude bowser-root-workspace run prettify",
"test": "yarn workspaces foreach --exclude bowser-root-workspace run test",
"typecheck": "yarn workspaces foreach -p --exclude bowser-root-workspace run tsc --noEmit",
"prepare": "husky install"
},
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint": "next lint -f stylish",
"test": "dotenv -e .env.test ../node_modules/.bin/vitest run --config ./vitest.config.ts",
"test:e2e": "NODE_ENV=test E2E_TEST=true yarn playwright test",
"test:e2e:ui": "NODE_ENV=test E2E_TEST=true yarn playwright test --ui --project=chromium",
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5844,6 +5844,17 @@ __metadata:
languageName: unknown
linkType: soft

"bowser-root-workspace@workspace:.":
version: 0.0.0-use.local
resolution: "bowser-root-workspace@workspace:."
dependencies:
danger: ^11.2.8
husky: ^8.0.3
lint-staged: ^14.0.1
prettier: ^3.0.3
languageName: unknown
linkType: soft

"bowser-server@workspace:*, bowser-server@workspace:server":
version: 0.0.0-use.local
resolution: "bowser-server@workspace:server"
Expand Down Expand Up @@ -13404,17 +13415,6 @@ __metadata:
languageName: node
linkType: hard

"root-workspace-0b6124@workspace:.":
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
danger: ^11.2.8
husky: ^8.0.3
lint-staged: ^14.0.1
prettier: ^3.0.3
languageName: unknown
linkType: soft

"rrweb-cssom@npm:^0.6.0":
version: 0.6.0
resolution: "rrweb-cssom@npm:0.6.0"
Expand Down

0 comments on commit 49fdbda

Please sign in to comment.