Skip to content

Commit

Permalink
Merge branch 'no-issue/move-to-ng-cli' into feat/MTM-59397-get-shell-…
Browse files Browse the repository at this point in the history
…builds-and-run-cypress-tests-workflow
  • Loading branch information
jdre-c8y committed Jun 19, 2024
2 parents 091b32a + 715817e commit 4db1a30
Show file tree
Hide file tree
Showing 95 changed files with 1,088 additions and 61,665 deletions.
16 changes: 16 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 2 Chrome versions
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
17 changes: 11 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
runs-on: ubuntu-22.04
name: Cypress tests
container:
image: cypress/browsers:node16.16.0-chrome107-ff107
image: cypress/browsers:node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'

- name: Install dependencies
Expand All @@ -45,7 +45,7 @@ jobs:
npm version prepatch --no-git-tag-version --preid $(git rev-parse --short HEAD)
- name: Build
run: npm run build:ci
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v3
Expand All @@ -54,14 +54,19 @@ jobs:
if-no-files-found: error
retention-days: 5
path: |
dist/apps/sag-pkg-community-plugins/**
dist/sag-pkg-community-plugins/**
- name: Copy files for http-server into apps subfolder
run: |
mkdir -p dist/apps/sag-pkg-community-plugins
cp -r dist/sag-pkg-community-plugins/* dist/apps/sag-pkg-community-plugins
- name: Cypress run
uses: cypress-io/github-action@v5
with:
start: npm run http-server
install: false
wait-on: 'http://localhost:9000/apps/sag-pkg-community-plugins/index.html'
wait-on: 'http://localhost:4200/apps/sag-pkg-community-plugins/index.html'
browser: chrome
record: false
config-file: cypress.config.ts
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'

- name: Install dependencies
Expand All @@ -37,13 +37,13 @@ jobs:
run: npm run lint

- name: Build
run: npm run build:ci
run: npm run build

- name: Zip build
run: |
cd dist/apps/sag-pkg-community-plugins
cd dist/sag-pkg-community-plugins
zip -r -q ../../build.zip *
cd ../../..
cd ../..
rm -r dist/apps
- name: Upload build artifact
Expand All @@ -53,7 +53,7 @@ jobs:
if-no-files-found: error
retention-days: 5
path: |
dist/build.zip
build.zip
release:
name: Release
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
node-version: '18'

- name: Save initial Version
id: save-initial-version
Expand Down Expand Up @@ -100,28 +100,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: v${{ needs.release.outputs.version }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build:ci
run: npm run build

- name: Zip build
run: |
cd dist/apps/sag-pkg-community-plugins
zip -r -q ../../../cumulocity-community-plugins-${{ needs.release.outputs.version }}.zip *
cd ../../..
rm -r dist/apps
cd dist/sag-pkg-community-plugins
zip -r -q ../../cumulocity-community-plugins-${{ needs.release.outputs.version }}.zip *
cd ../..
rm -r dist
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down
150 changes: 43 additions & 107 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,109 +1,45 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

*.zip
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

# Cypress videos
cypress/videos
cypress/videos
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
Loading

0 comments on commit 4db1a30

Please sign in to comment.