Skip to content

Commit 310b1d5

Browse files
ci: add github CI setup (#4)
1 parent f1e6a60 commit 310b1d5

File tree

4 files changed

+49
-4
lines changed

4 files changed

+49
-4
lines changed

.github/workflows/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Standard Angular App Flow
2+
3+
on:
4+
pull_request:
5+
branches: [ "main", "development" ]
6+
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '18' # Adjust this to the Node.js version your project needs
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Run linting
24+
run: npm run lint
25+
26+
build:
27+
name: Build
28+
runs-on: ubuntu-latest
29+
needs: lint
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
- name: Set up Node.js
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: '18' # Adjust this to the Node.js version your project needs
38+
39+
- name: Install dependencies
40+
run: npm install
41+
42+
- name: Build app
43+
run: npm run build

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
{
4343
"type": "anyComponentStyle",
4444
"maximumWarning": "2kb",
45-
"maximumError": "4kb"
45+
"maximumError": "400kb"
4646
}
4747
],
4848
"outputHashing": "all"

src/app/app.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import { NgModule } from '@angular/core';
22
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
3+
// eslint-disable-next-line import/no-extraneous-dependencies
34
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
4-
import { HttpClient } from '@angular/common/http';
5+
import { HttpClient, HttpClientModule } from '@angular/common/http';
56
import HttpLoaderFactory from 'src/assets/i18n/loader';
7+
import { BrowserModule } from '@angular/platform-browser';
68
import AppComponent from './app.component';
79
import AppRoutingModule from './app-routing.module';
810

911
@NgModule({
1012
declarations: [AppComponent],
1113
imports: [
14+
BrowserModule,
1215
AppRoutingModule,
16+
HttpClientModule,
1317
TranslateModule.forRoot({
1418
loader: {
1519
provide: TranslateLoader,

src/app/features/landing/components/landing-footer/landing-footer.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { LayoutService } from 'src/app/core/layout/service/app.layout.service';
43
import LanguageService from 'src/app/shared/services/language.service';
54
import LANGUAGES from '../../../../shared/constants/language.constants';
65
import ILanguage from '../../../../shared/models/shared.model';
@@ -17,7 +16,6 @@ export default class LandingFooterComponent implements OnInit {
1716

1817
// eslint-disable-next-line no-useless-constructor
1918
constructor(
20-
public layoutService: LayoutService,
2119
public router: Router,
2220
private languageService: LanguageService, // eslint-disable-next-line no-empty-function
2321
) {}

0 commit comments

Comments
 (0)