This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add linter, and prettier to project
- Loading branch information
Showing
174 changed files
with
5,530 additions
and
4,160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,46 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": [ | ||
"projects/**/*" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.ts" | ||
], | ||
"parserOptions": { | ||
"project": [ | ||
"tsconfig.json", | ||
"e2e/tsconfig.json" | ||
], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"prefix": "app", | ||
"style": "kebab-case", | ||
"type": "element" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"prefix": "app", | ||
"style": "camelCase", | ||
"type": "attribute" | ||
} | ||
], | ||
"@angular-eslint/component-class-suffix": [ | ||
"error", | ||
{ | ||
"suffixes": [ | ||
"Page", | ||
"Component", | ||
"Dialog" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"*.html" | ||
], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended" | ||
], | ||
"rules": { } | ||
} | ||
] | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json", "e2e/tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": [ | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"prefix": "app", | ||
"style": "kebab-case", | ||
"type": "element" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"prefix": "app", | ||
"style": "camelCase", | ||
"type": "attribute" | ||
} | ||
], | ||
"@angular-eslint/component-class-suffix": [ | ||
"error", | ||
{ | ||
"suffixes": ["Page", "Component", "Dialog"] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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,59 +1,59 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push PROD Docker image | ||
if: github.ref_type == 'tag' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ghcr.io/leaphy-robotics/leaphy-webbased/leaphy-webbased:prod | ||
|
||
- name: Build and push TEST Docker image | ||
if: github.ref_type == 'branch' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ghcr.io/leaphy-robotics/leaphy-webbased/leaphy-webbased:main | ||
|
||
- name: Redeploy TEST | ||
if: github.ref_type == 'branch' | ||
run: | | ||
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=leaphy-webbased-test -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}" | ||
- name: Redeploy PROD | ||
if: github.ref_type == 'tag' | ||
run: | | ||
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=leaphy-webbased -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}" | ||
- name: Clean up old images | ||
uses: actions/delete-package-versions@v5 | ||
with: | ||
package-name: 'leaphy-webbased/leaphy-webbased' | ||
package-type: 'container' | ||
min-versions-to-keep: 5 | ||
delete-only-untagged-versions: 'true' | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push PROD Docker image | ||
if: github.ref_type == 'tag' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ghcr.io/leaphy-robotics/leaphy-webbased/leaphy-webbased:prod | ||
|
||
- name: Build and push TEST Docker image | ||
if: github.ref_type == 'branch' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ghcr.io/leaphy-robotics/leaphy-webbased/leaphy-webbased:main | ||
|
||
- name: Redeploy TEST | ||
if: github.ref_type == 'branch' | ||
run: | | ||
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=leaphy-webbased-test -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}" | ||
- name: Redeploy PROD | ||
if: github.ref_type == 'tag' | ||
run: | | ||
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=leaphy-webbased -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}" | ||
- name: Clean up old images | ||
uses: actions/delete-package-versions@v5 | ||
with: | ||
package-name: "leaphy-webbased/leaphy-webbased" | ||
package-type: "container" | ||
min-versions-to-keep: 5 | ||
delete-only-untagged-versions: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
name: Playwright Tests | ||
on: | ||
pull_request: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [main, master] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/playwright:v1.42.1-jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: yarn | ||
- name: Install node modules | ||
run: yarn --frozen-lockfile --prefer-offline | ||
- name: Run linter | ||
run: yarn lint | ||
- name: Run Playwright tests | ||
run: yarn playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/playwright:v1.42.1-jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: "https://registry.npmjs.org" | ||
cache: yarn | ||
- name: Install node modules | ||
run: yarn --frozen-lockfile --prefer-offline | ||
- name: Run linter | ||
run: yarn lint | ||
- name: Run ESLint | ||
run: npx eslint . | ||
|
||
- name: Run prettier | ||
run: npx prettier -c . | ||
- name: Run Playwright tests | ||
run: yarn playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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
Oops, something went wrong.