Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: a7e00ac4c963513c8b8edf93790146091f90c163
  • Loading branch information
Code Intelligence authored and Henning Perl committed Jun 17, 2018
0 parents commit 47fb83d
Show file tree
Hide file tree
Showing 144 changed files with 34,890 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "ci-electron"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"backend",
"favicon.ico",
"electron.prod.js",
"package.json",
{
"glob": "**/*",
"input": "../node_modules/monaco-editor/min/vs",
"output": "libs/vs"
}
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css",
"../node_modules/@clr/icons/clr-icons.min.css",
"../node_modules/@clr/ui/clr-ui.min.css"
],
"scripts": [
"../node_modules/@webcomponents/custom-elements/custom-elements.min.js",
"../node_modules/@clr/icons/clr-icons.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"hmr": "environments/environment.hmr.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {
}
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

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

[*.md]
max_line_length = off
trim_trailing_whitespace = false
83 changes: 83 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# We are using yarn (and yarn.lock) now.
package-lock.json

# compiled output
/dist
/tmp
/out-tsc
/packages
build.sh

# dependencies
/node_modules

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


# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db

# Test files
test/data/autotools_project/.deps
test/data/autotools_project/autom4te.cache
test/data/autotools_project/aclocal.m4
test/data/autotools_project/scan-build-*
test/data/autotools_project/build.sh
test/data/autotools_project/ci-report.json
test/data/autotools_project/compile
test/data/autotools_project/compile_commands.json
test/data/autotools_project/config.h
test/data/autotools_project/config.h.in
test/data/autotools_project/config.log
test/data/autotools_project/config.status
test/data/autotools_project/configure
test/data/autotools_project/depcomp
test/data/autotools_project/install-sh
test/data/autotools_project/main
test/data/autotools_project/main.o
test/data/autotools_project/Makefile
test/data/autotools_project/Makefile.in
test/data/autotools_project/missing
test/data/autotools_project/stamp-h1
test/data/cmake_project/build
test/data/cmake_project/build.sh
test/data/cmake_project/compile_commands.json
test/data/make_project/build.sh
test/data/make_project/compile_commands.json
test/data/make_project/main

# Clang SA files
compile_commands.json
ci-report.json
scan-build-*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ci-tools"]
path = ci-tools
url = [email protected]:code-intelligence/ci-tools.git
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.6.4
3 changes: 3 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package(default_visibility = ["//visibility:public"])

filegroup(name = "node_modules", srcs = glob(["node_modules/**/*"]))
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# CiElectron

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.0.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

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.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
18 changes: 18 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/bash
# Run continuous integration tests

# Fail at first error
set -e

# Run frontend tests
yarn ci &
frontend_tests=$!

# Run backend tests
pushd nodejs-backend-server
(yarn && yarn ci) &
backend_tests=$!
popd

wait $frontend_tests
wait $backend_tests
14 changes: 14 additions & 0 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { AppPage } from './app.po';

describe('ci-electron App', () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
});
});
11 changes: 11 additions & 0 deletions e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
}
}
14 changes: 14 additions & 0 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
47 changes: 47 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma'),
require('karma-script-launcher'),
require('karma-electron')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
useIframe: false
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
preprocessors: {
'**/*.js': ['electron']
},
browsers: ['CustomElectron'],
customLaunchers: {
Chrome_no_sandbox: {
base: 'Chrome', flags: ['--no-sandbox']
},
CustomElectron: {
base: 'Electron', flags: ['./src/electron.dev', '--no-sandbox']
}
},
singleRun: false
});
};
6 changes: 6 additions & 0 deletions nodejs-backend-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build
dist
yarn-error.log
test/data/invalid

node_modules
27 changes: 27 additions & 0 deletions nodejs-backend-server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "ci-security-scanner-ws-backend",
"version": "0.0.1",
"license": "other",
"main": "main.js",
"scripts": {
"watch": "webpack --watch",
"build": "webpack",
"test": "mocha test",
"ci": "yarn build && mocha --exit --reporter mocha-teamcity-reporter test"
},
"private": true,
"dependencies": {
"create-output-stream": "^0.0.1",
"which": "^1.3.0",
"ws": "^4.0.0",
"bluebird": "^3.0.0"
},
"devDependencies": {
"webpack": "^4.1.0",
"webpack-cli": "^2.0.12",
"sinon": "^4.4.6",
"chai": "^4.1.2",
"mocha": "^5.0.4",
"mocha-teamcity-reporter": "^2.2.2"
}
}
Loading

0 comments on commit 47fb83d

Please sign in to comment.