Skip to content
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

Initial test suites + CI pipeline #5

Merged
merged 1 commit into from
Feb 12, 2024
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
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test-all:
name: Build and test all

runs-on: ubuntu-22.04

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4

- name: Cache firebase emulators
uses: actions/cache@v4
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-firebase-emulators-${{ github.sha }}
restore-keys: |
${{ runner.os }}-firebase-emulators-

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"

# Firebase

- name: "Firebase: install dependencies"
run: pnpm install --frozen-lockfile
working-directory: ./firebase

- name: "Firebase: build"
run: pnpm functions:build # Needed before lint so compiled code from `common` is available for the functions code
working-directory: ./firebase

- name: "Firebase: lint"
run: pnpm lint
working-directory: ./firebase

- name: "Firebase: tests"
run: pnpm test
working-directory: ./firebase

# App

- name: "App: install dependencies"
run: pnpm install --frozen-lockfile
working-directory: ./app

- name: "App: lint"
run: pnpm lint
working-directory: ./app

- name: "App: tests"
run: pnpm test:ci
working-directory: ./app

- name: "App: build"
run: pnpm build
working-directory: ./app
38 changes: 20 additions & 18 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless",
"serve:ssr:app": "node dist/app/server/server.mjs",
"lint": "ng lint"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.1.2",
"@angular/animations": "^17.1.3",
"@angular/cdk": "17.1.2",
"@angular/common": "^17.1.2",
"@angular/compiler": "^17.1.2",
"@angular/core": "^17.1.2",
"@angular/forms": "^17.1.2",
"@angular/common": "^17.1.3",
"@angular/compiler": "^17.1.3",
"@angular/core": "^17.1.3",
"@angular/forms": "^17.1.3",
"@angular/material": "17.1.2",
"@angular/platform-browser": "^17.1.2",
"@angular/platform-browser-dynamic": "^17.1.2",
"@angular/platform-server": "^17.1.2",
"@angular/router": "^17.1.2",
"@angular/service-worker": "^17.1.2",
"@angular/ssr": "^17.1.2",
"@angular/platform-browser": "^17.1.3",
"@angular/platform-browser-dynamic": "^17.1.3",
"@angular/platform-server": "^17.1.3",
"@angular/router": "^17.1.3",
"@angular/service-worker": "^17.1.3",
"@angular/ssr": "^17.1.3",
"@ngrx/operators": "^17.1.0",
"@ngrx/signals": "^17.1.0",
"express": "^4.18.2",
Expand All @@ -38,32 +39,33 @@
"zone.js": "~0.14.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.1.2",
"@angular-devkit/build-angular": "^17.1.3",
"@angular-eslint/builder": "17.2.1",
"@angular-eslint/eslint-plugin": "17.2.1",
"@angular-eslint/eslint-plugin-template": "17.2.1",
"@angular-eslint/schematics": "17.2.1",
"@angular-eslint/template-parser": "17.2.1",
"@angular/cli": "^17.1.2",
"@angular/compiler-cli": "^17.1.2",
"@angular/cli": "^17.1.3",
"@angular/compiler-cli": "^17.1.3",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^20.11.16",
"@types/node": "^20.11.17",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"jasmine-core": "~5.1.0",
"jasmine-core": "~5.1.2",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"postcss": "^8.4.34",
"ng-mocks": "^14.12.1",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.1",
"typescript": "~5.3.3"
}
}
}
Loading