Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Revert "chore: add linter, and prettier to project"
Browse files Browse the repository at this point in the history
This reverts commit 5cbed99.
  • Loading branch information
koen1711 committed Apr 15, 2024
1 parent 1079414 commit abcbab9
Show file tree
Hide file tree
Showing 174 changed files with 4,160 additions and 5,530 deletions.
103 changes: 59 additions & 44 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,61 @@
{
"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": { }
}
]
}
108 changes: 54 additions & 54 deletions .github/workflows/docker.yaml
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'
57 changes: 26 additions & 31 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
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 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
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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Leaphy Easybloqs

## Introduction

Leaphy Easybloqs is software to program [Leaphy Robots](https://www.leaphy.nl) and Arduino microcontrollers using a block-based programming language and a user-friendly interface.
It also support programming RP2040 controllers that are able to run MicroPython.

## Contributing

We welcome PRs from anyone that wants to contribute!
We welcome PRs from anyone that wants to contribute!

### Prerequisites

The following should be installed:

- NodeJS (Version 20.X)
- NodeJS (Version 20.X)
On Windows: Be sure to install the build tools by checking the box during the NodeJS installation process
- Yarn v1
- Yarn v1

### Running locally

First install the dependencies by running `yarn intall`. This will take a while the first time.
Then run `yarn start` to start the application.
First install the dependencies by running `yarn intall`. This will take a while the first time.
Then run `yarn start` to start the application.


### Pull Requests

Expand All @@ -31,3 +30,4 @@ Once merged, it will show up on https://testleaphyeasybloqs.com for integration

All issues that involve webbased should be reported on the [Leaphy Easybloqs Webbased GitHub](https://github.com/leaphy-robotics/leaphy-webbased/issues) page.
Issues that involve the blocks should be reported on the [Leaphy Blocks GitHub](https://github.com/leaphy-robotics/leaphy-blocks/issues) page.

24 changes: 16 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,25 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"headers": {
"headers": {
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Opener-Policy": "same-origin"
},
"buildTarget": "leaphy-client:build"
},
"configurations": {
"production": {
"buildTarget": "leaphy-client:build:production"
"buildTarget": "leaphy-client:build:production"
},
"dev": {
"buildTarget": "leaphy-client:build:dev"
"buildTarget": "leaphy-client:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "leaphy-client:build"
"buildTarget": "leaphy-client:build"
}
},
"test": {
Expand All @@ -170,7 +170,10 @@
"main": "src/test.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss",
"src/theme.scss",
Expand All @@ -182,7 +185,10 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
},
"e2e": {
Expand All @@ -204,7 +210,9 @@
}
},
"cli": {
"analytics": "6d8c3839-2848-4328-b7fb-a10f9273fdfc",
"schematicCollections": ["@angular-eslint/schematics"]
"analytics": "6d8c3839-2848-4328-b7fb-a10f9273fdfc",
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
Loading

0 comments on commit abcbab9

Please sign in to comment.