Skip to content

ci: add github CI setup #4

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

Merged
merged 7 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Standard Angular App Flow

on:
pull_request:
branches: [ "main", "development" ]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Adjust this to the Node.js version your project needs

- name: Install dependencies
run: npm install

- name: Run linting
run: npm run lint

build:
name: Build
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Adjust this to the Node.js version your project needs

- name: Install dependencies
run: npm install

- name: Build app
run: npm run build
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumError": "400kb"
}
],
"outputHashing": "all"
Expand Down
6 changes: 5 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { NgModule } from '@angular/core';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
// eslint-disable-next-line import/no-extraneous-dependencies
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { HttpClient } from '@angular/common/http';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import HttpLoaderFactory from 'src/assets/i18n/loader';
import { BrowserModule } from '@angular/platform-browser';
import AppComponent from './app.component';
import AppRoutingModule from './app-routing.module';

@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { LayoutService } from 'src/app/core/layout/service/app.layout.service';
import LanguageService from 'src/app/shared/services/language.service';
import LANGUAGES from '../../../../shared/constants/language.constants';
import ILanguage from '../../../../shared/models/shared.model';
Expand All @@ -17,7 +16,6 @@ export default class LandingFooterComponent implements OnInit {

// eslint-disable-next-line no-useless-constructor
constructor(
public layoutService: LayoutService,
public router: Router,
private languageService: LanguageService, // eslint-disable-next-line no-empty-function
) {}
Expand Down