Skip to content
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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
build:
name: Test and build
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci

- name: Unit tests
run: npx ng test --watch=false

- name: Production build
run: npx ng build --configuration production
43 changes: 36 additions & 7 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,57 @@
"tsConfig": "tsconfig.app.json",
"outputPath": "dist/storefront",
"index": "src/index.html",
"styles": ["src/tailwind.css"],
"assets": [{ "glob": "**/*", "input": "public" }]
"styles": [
"src/tailwind.css"
],
"assets": [
{
"glob": "**/*",
"input": "public"
}
]
},
"configurations": {
"production": {
"budgets": [
{ "type": "initial", "maximumWarning": "750kB", "maximumError": "1MB" },
{ "type": "anyComponentStyle", "maximumWarning": "8kB", "maximumError": "12kB" }
{
"type": "initial",
"maximumWarning": "750kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "8kB",
"maximumError": "12kB"
}
],
"outputHashing": "all"
},
"development": { "optimization": false, "sourceMap": true }
"development": {
"optimization": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular/build:dev-server",
"configurations": {
"production": { "buildTarget": "storefront:build:production" },
"development": { "buildTarget": "storefront:build:development" }
"production": {
"buildTarget": "storefront:build:production"
},
"development": {
"buildTarget": "storefront:build:development"
}
},
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "tsconfig.spec.json",
"buildTarget": "::development"
}
}
}
}
Expand Down
Loading
Loading