-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move linting and typechecking to GitHub Actions (#734)
* Add types of `wasm` package to repository * Extend dev container by local GitHub Actions runner * Remove linting and typechecking from Dockerfile * Move only all linting and typechecking packages to `devDependencies` * Do not install development dependencies in Dockerfile pipeline * Shorten global yarn scripts * Enable only specific build scripts Signed-off-by: Marvin A. Ruder <[email protected]>
- Loading branch information
1 parent
4cd8828
commit 240f2ab
Showing
15 changed files
with
103 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "GitHub Actions" | ||
|
||
on: [push] | ||
|
||
jobs: | ||
eslint: | ||
name: ESLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Read Node.js version | ||
run: echo "nodeVersion=$(cat ./docker/Dockerfile-ci | grep 'FROM node' | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*')" >> $GITHUB_OUTPUT | ||
id: nodeVersion | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ steps.nodeVersion.outputs.nodeVersion }} | ||
- name: Setup yarn | ||
run: | | ||
corepack enable | ||
yarn --immutable --mode=skip-build | ||
yarn prisma:generate | ||
- name: Run ESLint | ||
run: yarn workspaces foreach -Apv -j unlimited run lint | ||
typecheck: | ||
name: TypeScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Read Node.js version | ||
run: echo "nodeVersion=$(cat ./docker/Dockerfile-ci | grep 'FROM node' | head -n 1 | grep -o '[0-9]*\.[0-9]*\.[0-9]*')" >> $GITHUB_OUTPUT | ||
id: nodeVersion | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ steps.nodeVersion.outputs.nodeVersion }} | ||
- name: Setup yarn | ||
run: | | ||
corepack enable | ||
yarn --immutable --mode=skip-build | ||
yarn prisma:generate | ||
- name: Run TypeScript | ||
run: yarn workspaces foreach -Apv -j unlimited run typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
defaultSemverRangePrefix: "" | ||
|
||
enableScripts: false | ||
|
||
networkConcurrency: 1024 | ||
|
||
packageExtensions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,17 +12,19 @@ | |
"packages/*" | ||
], | ||
"scripts": { | ||
"dev": "conc --kill-others \"yarn workspace @rating-tracker/backend dev:run\" \"yarn workspace @rating-tracker/backend dev:watch\" \"yarn workspace @rating-tracker/frontend dev:vite\" -n \",≫,\" -p \"{name}\" -c #339933,#FFCF00,#61DAFB --timings", | ||
"dev": "conc --kill-others \"yarn dev:run\" \"yarn dev:watch\" \"yarn dev:vite\" -n \",≫,\" -p \"{name}\" -c #339933,#FFCF00,#61DAFB --timings", | ||
"test": "yarn workspaces foreach -Apv -j unlimited run test", | ||
"build": "yarn workspaces foreach -Apv -j unlimited run build", | ||
"build:wasm": "wasm-pack build -s rating-tracker -d ../packages/wasm --release wasm && sed -E -i.bak 's/\"module\": \"([A-Za-z0-9\\-\\.]+)\",/\"main\": \"\\1\",\\\n \"module\": \"\\1\",/g ; s/^}$/}\\\n/' packages/wasm/package.json && rm packages/wasm/package.json.bak", | ||
"validate": "conc \"yarn workspaces foreach -Apv -j unlimited run typecheck\" \"yarn workspaces foreach -Apv -j unlimited run lint\" -n \"ﯤ,\" -p \"{name}\" -c #3178C6,#4B32C3", | ||
"fix:swagger": "mkdir -p packages/backend/dist/public/api-docs && cp .yarn/unplugged/swagger-ui-dist-*/node_modules/swagger-ui-dist/swagger-ui{.css,-bundle.js,-standalone-preset.js} packages/backend/dist/public/api-docs/" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"concurrently": "8.2.2" | ||
}, | ||
"devDependencies": { | ||
"@yarnpkg/sdks": "3.1.0", | ||
"concurrently": "8.2.2", | ||
"eslint": "8.54.0", | ||
"prettier": "3.1.0", | ||
"typescript": "5.3.2" | ||
|
@@ -36,6 +38,12 @@ | |
"whatwg-url": "14.0.0" | ||
}, | ||
"dependenciesMeta": { | ||
"@prisma/engines": { | ||
"built": true | ||
}, | ||
"prisma": { | ||
"built": true | ||
}, | ||
"swagger-ui-dist": { | ||
"unplugged": true | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {Uint8Array} _array | ||
* @returns {string} | ||
*/ | ||
export function convert_avatar(_array: Uint8Array): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters