Skip to content

Commit

Permalink
Merge branch 'master' into feature/1-app-navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
rusudinu committed Mar 5, 2024
2 parents 436b75c + ad996ca commit db369c7
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 48 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-app-start.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check app start
on: push
jobs:
check_app_start:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
- name: Start app
run: |
yarn test-headless
34 changes: 34 additions & 0 deletions .github/workflows/check-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check lint
on: push
jobs:
check_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
- name: Lint
run: |
yarn lint
44 changes: 44 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to prod
'on':
push:
branches:
- prod
jobs:
deploy_prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
- name: Build
run: |
yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_LUCRA_EXPENSES }}'
channelId: live
projectId: lucra-expenses
40 changes: 40 additions & 0 deletions .github/workflows/deploy-qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy to qa
'on': pull_request
jobs:
deploy_qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: |
yarn install --frozen-lockfile
- name: Build
run: |
yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_LUCRA_EXPENSES }}'
projectId: lucra-expenses
17 changes: 0 additions & 17 deletions .github/workflows/firebase-hosting-merge.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

19 changes: 3 additions & 16 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
import { TestBed } from '@angular/core/testing';

import { AppComponent } from './app.component';
import { DashboardComponent } from './dashboard/dashboard/dashboard.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
imports: [DashboardComponent],
}).compileComponents();
});

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const fixture = TestBed.createComponent(DashboardComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});

it('should have the lucra title', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('lucra');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, lucra');
});
});
1 change: 0 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { UserLoginComponent } from './user/user-login/user-login.component';
styleUrl: './app.component.scss',
})
export class AppComponent {
title = 'lucra';
firestore: Firestore = inject(Firestore);

constructor() {
Expand Down

0 comments on commit db369c7

Please sign in to comment.