Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/tar-7.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
askonev authored Aug 12, 2024
2 parents b9f51d2 + 4e0cd52 commit 24dde35
Show file tree
Hide file tree
Showing 14 changed files with 12,277 additions and 7,348 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 2
updates:
- package-ecosystem: docker
directories:
- "/"
- "/docker-build"
schedule:
interval: daily
time: "02:00"
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Docker Build
run: |
docker run -t $(docker build -q .) bash -c 'ls -la dist'
26 changes: 26 additions & 0 deletions .github/workflows/jasmine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Karma Jasmine Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
jasmine:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
install-dependencies: true
install-chromedriver: true
- uses: actions/setup-node@v4
with:
node-version: 16.17.1
- name: Install packages
run: npm install
- name: Run
run: npm run ng test
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## master (unreleased)

* Added
* Fixed docker-build script
* Added unit tests on chrome browser via Karma Jasmine
* Ability to create plans from interface
* Ability to filter plans by creating type (api or manual creating)

Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM node:10.14.0-jessie
FROM node:16.17.1-buster

RUN mkdir /palladium-view
WORKDIR /palladium-view
COPY . /palladium-view
WORKDIR /palladium-view

RUN npm install
RUN npm run build
CMD bash wait_for_volume.sh

CMD ["bash", "wait_for_volume.sh"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Run `ng build` to build the project. The build artifacts will be stored
in the `dist/` directory.
Use the `-prod` flag for a production build.

## Build with docker

Run `./docker-build/build.sh` to build the project without dependencies.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
Expand Down
12 changes: 8 additions & 4 deletions docker-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM node:8.1.4
FROM node:16.17.1-buster

RUN mkdir /palladium-view
COPY . /palladium-view
WORKDIR /palladium-view
ADD . /palladium-view
RUN npm install -g @angular/cli --unsafe-perm && npm i
RUN ng build --prod --aot false

RUN npm install -g @angular/cli --unsafe-perm && npm install

ENTRYPOINT ["ng"]
CMD ["build", "--prod", "--aot=false"]
3 changes: 1 addition & 2 deletions docker-build/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash
docker build -t palladium_view_builder .
docker run -itd --rm --name palladium_view_builder palladium_view_builder /bin/bash
docker cp palladium_view_builder:/palladium-view/dist/ dist
docker cp palladium_view_builder:/palladium-view/dist ./
docker stop palladium_view_builder

59 changes: 59 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const { Server } = require("karma");

module.exports = function (config) {
config.set({
basePath: "",
frameworks: ["jasmine", "@angular-devkit/build-angular"],
plugins: [
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("karma-coverage-istanbul-reporter"),
require("@angular-devkit/build-angular/plugins/karma"),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require("path").join(__dirname, "./coverage/palladium"),
reports: ["html", "lcovonly", "text-summary"],
fixWebpackSourcePaths: true,
},
reporters: ["progress", "kjhtml"],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ["Chrome"],
singleRun: true,
customLaunchers: {
ChromeHeadlessCustom: {
base: "ChromeHeadless",
flags: [
"--disable-gpu", // Disable hardware acceleration
"--no-sandbox", // Needed when running as root user in Docker
"--headless",
"--disable-dev-shm-usage", // Fixes issues with Docker memory limitations
"--disable-setuid-sandbox", // not recommended for security reasons but sometimes necessary
],
},
},
browsers: ['ChromeHeadlessCustom'],
restartOnFileChange: true,
files: [
{
pattern: "src/**/*.spec.ts",
watched: true,
included: false,
served: false,
},
],
httpsServerOptions: { // disable SSL certificate checks
key: '',
cert: '',
ca: '',
requestCert: false,
rejectUnauthorized: false
}
});
};
Loading

0 comments on commit 24dde35

Please sign in to comment.