-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Home]: Separate homepage from datahub in two apps #49
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5ac9b22
refactor(libs): move all datahub common components to a new mel lib
tkohr 52c4ba5
refactor(home): generate new home app and align settings with datahub…
tkohr 18dbb90
refactor(home): move according components to home app [WIP]
tkohr 0af02bc
feat(home): implement 'routing' to datahub
tkohr b143343
chore(home): use angular application builder
tkohr 20d910e
chore(project): move assets to root
tkohr 7584803
chore(project): move style.css to root
tkohr 72ac651
chore(i18n): move translations to resources folder
tkohr 9221c52
chore(mel lib): remove unnecessary module imports
tkohr 95cbad1
chore(home): remove unnecessary module imports
tkohr c467f76
chore(home): move and adapt e2e tests
tkohr 7bfe1a7
chore(ci): adapt workflow to test and build home app
tkohr 7698d18
chore(package.json): update gn-ui
tkohr 778bc40
feat: update image names
f-necas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -48,20 +48,24 @@ jobs: | |
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Run docker-build | ||
- name: Run docker-build for datahub | ||
run: npx nx docker-build mel-datahub | ||
|
||
- name: Run docker-build for home | ||
run: npx nx docker-build home | ||
|
||
- uses: docker/login-action@v1 | ||
name: Login to GitHub Container Registry | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Pushing the image onto ghcr.io' | ||
- name: 'Pushing the images onto ghcr.io' | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
docker push ghcr.io/camptocamp/mel-dataplatform/datahub:latest | ||
docker push ghcr.io/camptocamp/mel-dataplatform/home:latest | ||
|
||
cypress-run: | ||
name: End-to-end tests | ||
|
@@ -86,9 +90,12 @@ jobs: | |
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Run tests | ||
- name: Run tests for datahub | ||
run: npx nx e2e mel-datahub-e2e | ||
|
||
- name: Run tests for home | ||
run: npx nx e2e home-e2e | ||
|
||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
|
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 was deleted.
Oops, something went wrong.
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,10 @@ | ||
{ | ||
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset' | ||
|
||
import { defineConfig } from 'cypress' | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
...nxE2EPreset(__filename, { cypressDir: 'src' }), | ||
baseUrl: 'http://localhost:4200', | ||
}, | ||
}) |
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,30 @@ | ||
{ | ||
"name": "home-e2e", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "application", | ||
"sourceRoot": "apps/home-e2e/src", | ||
"targets": { | ||
"e2e": { | ||
"executor": "@nx/cypress:cypress", | ||
"options": { | ||
"cypressConfig": "apps/home-e2e/cypress.config.ts", | ||
"testingType": "e2e", | ||
"devServerTarget": "home:serve:development" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"devServerTarget": "home:serve:production" | ||
}, | ||
"ci": { | ||
"devServerTarget": "home:serve-static" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"] | ||
} | ||
}, | ||
"tags": [], | ||
"implicitDependencies": ["home"] | ||
} |
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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 @@ | ||
export const getGreeting = () => cy.get('h1') |
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,35 @@ | ||
/// <reference types="cypress" /> | ||
|
||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
declare namespace Cypress { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
interface Chainable<Subject> { | ||
login(email: string, password: string): void | ||
} | ||
} | ||
|
||
// -- This is a parent command -- | ||
Cypress.Commands.add('login', (email, password) => { | ||
console.log('Custom command example: Login', email, password) | ||
}) | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) |
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,17 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.ts using ES2015 syntax: | ||
import './commands' |
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,24 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"outDir": "../../dist/out-tsc", | ||
"module": "commonjs", | ||
"types": ["cypress", "node"], | ||
"sourceMap": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"noImplicitOverride": true, | ||
"noPropertyAccessFromIndexSignature": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.js", | ||
"cypress.config.ts", | ||
"**/*.cy.ts", | ||
"**/*.cy.js", | ||
"**/*.d.ts" | ||
] | ||
} |
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,36 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"extends": [ | ||
"plugin:@nx/angular", | ||
"plugin:@angular-eslint/template/process-inline-templates" | ||
], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "melDataplatform", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "mel-datahub", | ||
"style": "kebab-case" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@nx/angular-template"], | ||
"rules": {} | ||
} | ||
] | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to get the services and pods cleaner, is it possible to rename them as
catalogue:latest
andaccueil:latest
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, feel free to rename it as it fits best for the deployment