Skip to content

Commit

Permalink
Merge branch 'ci'
Browse files Browse the repository at this point in the history
  • Loading branch information
un33k committed Nov 10, 2022
2 parents c5fffc0 + e4434e8 commit b3d5272
Show file tree
Hide file tree
Showing 192 changed files with 7,134 additions and 9,173 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'

- name: Get branch name
id: branch
Expand All @@ -66,6 +66,9 @@ jobs:
- name: Run tester
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn test:ci

- name: Run e2e
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn e2e:ci

- name: Combine coverage
run: |
NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn coverage:merge
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'

- name: Get branch name
id: branch
Expand All @@ -67,6 +67,9 @@ jobs:
- name: Run tester
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn test:ci

- name: Run e2e
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn e2e:ci

- name: Combine coverage
run: |
NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn coverage:merge
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '16'

- name: Get branch name
id: branch
Expand All @@ -66,6 +66,9 @@ jobs:
- name: Run tester
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn test:ci

- name: Run e2e
run: NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn e2e:ci

- name: Combine coverage
run: |
NX_BRANCH=${{ steps.vars.outputs.current_branch }} yarn coverage:merge
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Thumbs.db
dev.db*

# nx migrations
migrations.json
migrations*.json
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"nrwl.angular-console",
"angular.ng-template",
"streetsidesoftware.code-spell-checker",
"msjsdiag.debugger-for-chrome",
"ms-azuretools.vscode-docker",
"mikestead.dotenv",
"dbaeumer.vscode-eslint",
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,18 @@ X.Y.Z Version
```txt<br>--------------------------------------------------------------------------------
Language Files Lines Blank Comment Code
--------------------------------------------------------------------------------
TypeScript 386 21513 2434 3985 15094
JSON 176 5047 0 0 5047
Markdown 105 2989 762 0 2227
TypeScript 419 22147 2450 4017 15680
JSON 175 5221 0 0 5221
Markdown 105 2987 761 0 2226
HTML 33 1453 114 5 1334
Sass 55 1449 140 35 1274
JavaScript 35 700 23 48 629
CSS 1 96 7 0 89
Plain Text 5 94 10 0 84
JavaScript 2 97 4 34 59
SQL 2 88 17 16 55
Toml 1 3 0 2 1
--------------------------------------------------------------------------------
Total 799 33432 3507 4091 25834
Total 798 33635 3503 4109 26023
--------------------------------------------------------------------------------
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'avidtrader-api',
preset: '../../jest.preset.js',
globals: {
Expand Down
13 changes: 8 additions & 5 deletions apps/avidtrader-api/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"root": "apps/avidtrader-api",
"name": "avidtrader-api",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/avidtrader-api/src",
"projectType": "application",
"prefix": "avidtrader-api",
"targets": {
"build": {
"executor": "@nrwl/node:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/avidtrader-api",
Expand All @@ -18,7 +19,9 @@
"input": "libs/agx-assets/src/lib/i18n/api",
"output": "assets/i18n"
}
]
],
"target": "node",
"compiler": "tsc"
},
"configurations": {
"production": {
Expand Down Expand Up @@ -70,9 +73,9 @@
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/avidtrader-api"],
"outputs": ["{workspaceRoot}/coverage/apps/avidtrader-api"],
"options": {
"jestConfig": "apps/avidtrader-api/jest.config.js",
"jestConfig": "apps/avidtrader-api/jest.config.ts",
"passWithNoTests": true
}
}
Expand Down
5 changes: 3 additions & 2 deletions apps/avidtrader-api/src/environments/environment.ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import { SecurityConfig } from '@fullerstack/nsx-auth';
import { I18nConfig } from '@fullerstack/nsx-i18n';
import { MailerConfig } from '@fullerstack/nsx-mailer';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { NestApplicationOptions } from '@nestjs/common';
import { ConfigModuleOptions } from '@nestjs/config';
import { GqlModuleOptions } from '@nestjs/graphql';

const serverConfig: NestApplicationOptions = {
logger: ['error', 'warn'],
Expand All @@ -27,14 +27,15 @@ const securityConfig: SecurityConfig = {
bcryptSaltOrRound: 10,
};

const graphqlConfig: GqlModuleOptions = {
const graphqlConfig: ApolloDriverConfig = {
debug: true,
playground: true,
autoSchemaFile: 'apps/avidtrader-api/src/prisma/schema.gql',
cors: {
credentials: true,
origin: 'http://localhost:4201',
},
driver: ApolloDriver,
};

const mailerConfig: MailerConfig = {
Expand Down
5 changes: 3 additions & 2 deletions apps/avidtrader-api/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import { SecurityConfig } from '@fullerstack/nsx-auth';
import { I18nConfig } from '@fullerstack/nsx-i18n';
import { MailerConfig } from '@fullerstack/nsx-mailer';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { NestApplicationOptions } from '@nestjs/common';
import { ConfigModuleOptions } from '@nestjs/config';
import { GqlModuleOptions } from '@nestjs/graphql';

const serverConfig: NestApplicationOptions = {
logger: ['error', 'warn'],
Expand All @@ -27,14 +27,15 @@ const securityConfig: SecurityConfig = {
bcryptSaltOrRound: 10,
};

const graphqlConfig: GqlModuleOptions = {
const graphqlConfig: ApolloDriverConfig = {
debug: false,
playground: false,
autoSchemaFile: 'apps/avidtrader-api/src/prisma/schema.gql',
cors: {
credentials: true,
origin: 'http://localhost:4201',
},
driver: ApolloDriver,
};

const mailerConfig: MailerConfig = {
Expand Down
5 changes: 3 additions & 2 deletions apps/avidtrader-api/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import { SecurityConfig } from '@fullerstack/nsx-auth';
import { I18nConfig } from '@fullerstack/nsx-i18n';
import { MailerConfig } from '@fullerstack/nsx-mailer';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { NestApplicationOptions } from '@nestjs/common';
import { ConfigModuleOptions } from '@nestjs/config';
import { GqlModuleOptions } from '@nestjs/graphql';

const serverConfig: NestApplicationOptions = {
logger: ['error', 'warn', 'log', 'debug', 'verbose'],
Expand All @@ -27,7 +27,7 @@ const securityConfig: SecurityConfig = {
bcryptSaltOrRound: 2,
};

const graphqlConfig: GqlModuleOptions = {
const graphqlConfig: ApolloDriverConfig = {
debug: true,
playground: true,
sortSchema: true,
Expand All @@ -40,6 +40,7 @@ const graphqlConfig: GqlModuleOptions = {
credentials: true,
origin: 'http://localhost:4200',
},
driver: ApolloDriver,
};

const mailerConfig: MailerConfig = {
Expand Down
2 changes: 1 addition & 1 deletion apps/avidtrader-api/src/prisma/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ input UserUpdateInput {

input UserWhereByIdInput {
id: ID!
}
}
2 changes: 1 addition & 1 deletion apps/avidtrader-api/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"emitDecoratorMetadata": true,
"target": "es2015"
},
"exclude": ["**/*.spec.ts"],
"exclude": ["**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"]
}
2 changes: 1 addition & 1 deletion apps/avidtrader-api/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["**/*.spec.ts", "**/*.d.ts"]
"include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
}
19 changes: 19 additions & 0 deletions apps/avidtrader-client-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';

const cypressJsonConfig = {
fileServerFolder: '.',
fixturesFolder: './src/fixtures',
video: true,
videosFolder: '../../dist/cypress/apps/avidtrader-client-e2e/videos',
screenshotsFolder: '../../dist/cypress/apps/avidtrader-client-e2e/screenshots',
chromeWebSecurity: false,
specPattern: 'src/e2e/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'src/support/e2e.ts',
};
export default defineConfig({
e2e: {
...nxE2EPreset(__dirname),
...cypressJsonConfig,
},
});
12 changes: 0 additions & 12 deletions apps/avidtrader-client-e2e/cypress.json

This file was deleted.

8 changes: 5 additions & 3 deletions apps/avidtrader-client-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"root": "apps/avidtrader-client-e2e",
"name": "avidtrader-client-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/avidtrader-client-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/avidtrader-client-e2e/cypress.json",
"cypressConfig": "apps/avidtrader-client-e2e/cypress.config.ts",
"devServerTarget": "avidtrader-client:serve:development",
"tsConfig": "apps/avidtrader-client-e2e/tsconfig.json"
"tsConfig": "apps/avidtrader-client-e2e/tsconfig.json",
"testingType": "e2e"
},
"configurations": {
"production": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ describe('avidtrader-client', () => {

it('should display welcome message', () => {
// Custom command example, see `../support/commands.ts` file
cy.login('my-email@something.com', 'myPassword');
// cy.login('my-email@something.com', 'myPassword');

// Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome to avidtrader-client!');
getGreeting().contains('Financial Market Research Portal');
});
});
22 changes: 0 additions & 22 deletions apps/avidtrader-client-e2e/src/plugins/index.js

This file was deleted.

5 changes: 4 additions & 1 deletion apps/avidtrader-client-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
"types": ["cypress", "node"],
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.js"],
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
Expand Down
7 changes: 5 additions & 2 deletions apps/avidtrader-client/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.

# For additional information regarding the format and rule options, please see:

# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:

# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'avidtrader-client',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -10,9 +11,9 @@ module.exports = {
},
coverageDirectory: '../../coverage/apps/avidtrader-client',
transform: {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$|screenfull)'],
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|screenfull)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
Expand Down

0 comments on commit b3d5272

Please sign in to comment.