diff options
| author | mo khan <mo.khan@gmail.com> | 2020-05-22 15:48:21 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-05-22 15:48:21 +0000 |
| commit | ef80bee8d1f97830449132afd1a4514c1d9d145b (patch) | |
| tree | 93a45ec7990788dcff4c1c18a29920698889e593 /spec | |
| parent | 7e044195b5148b1b9ecbb92d88eb2e4c57a3d81b (diff) | |
Add functional tests to the pipeline
* Move jobs to gitlab-ci.yml files that match the stage they belong to.
* Move linter job to build stage
* Add functional test jobs
* Reduce max size to 2 GB
* Pass the current pipeline image to the downstream jobs
* Replace `edge` tag with `latest`
* Use $CI_DEFAULT_BRANCH instead of master
* Move `.env*` files to config dir and update RELEASE instructions
* Combine `tag` and `release` stages into `deploy` stage as recommended in GitLab docs
* Make the `build-docker-image` job interruptible
* Fix issues found in code quality report
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/fixtures/expected/js/bower/v1.0.json | 159 | ||||
| -rw-r--r-- | spec/fixtures/expected/js/bower/v1.1.json | 232 | ||||
| -rw-r--r-- | spec/fixtures/expected/js/bower/v2.0.json | 150 | ||||
| -rw-r--r-- | spec/integration/js/bower_spec.rb | 2 |
4 files changed, 543 insertions, 0 deletions
diff --git a/spec/fixtures/expected/js/bower/v1.0.json b/spec/fixtures/expected/js/bower/v1.0.json new file mode 100644 index 0000000..cbffaa2 --- /dev/null +++ b/spec/fixtures/expected/js/bower/v1.0.json @@ -0,0 +1,159 @@ +{ + "licenses": [ + { + "count": 7, + "name": "MIT" + }, + { + "count": 1, + "name": "ISC" + }, + { + "count": 1, + "name": "New BSD, MIT, ISC, Apache 2.0" + }, + { + "count": 1, + "name": "unknown" + } + ], + "dependencies": [ + { + "license": { + "name": "New BSD, MIT, ISC, Apache 2.0", + "url": "http://en.wikipedia.org/wiki/ISC_license" + }, + "dependency": { + "name": "cli", + "url": "https://github.com/npm/cli", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "ev-emitter", + "url": "https://github.com/metafizzy/ev-emitter", + "description": "lil' event emitter", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "fizzy-ui-utils", + "url": "https://github.com/metafizzy/fizzy-ui-utils", + "description": "UI utilities", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "get-size", + "url": "https://github.com/desandro/get-size", + "description": "measures element size", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "jquery", + "url": "https://github.com/jquery/jquery-dist", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "ISC", + "url": "http://en.wikipedia.org/wiki/ISC_license" + }, + "dependency": { + "name": "js-bower", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "masonry-layout", + "url": "https://masonry.desandro.com", + "description": "Cascading grid layout library", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "matches-selector", + "url": "https://github.com/desandro/matches-selector", + "description": "matches/matchesSelector helper", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "outlayer", + "url": "https://github.com/metafizzy/outlayer", + "description": "the brains and guts of a layout library", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "unknown" + }, + "dependency": { + "name": "stimulus.umd", + "description": "", + "pathes": [ + "." + ] + } + } + ] +}
\ No newline at end of file diff --git a/spec/fixtures/expected/js/bower/v1.1.json b/spec/fixtures/expected/js/bower/v1.1.json new file mode 100644 index 0000000..7351634 --- /dev/null +++ b/spec/fixtures/expected/js/bower/v1.1.json @@ -0,0 +1,232 @@ +{ + "version": "1.1", + "licenses": [ + { + "count": 7, + "name": "MIT" + }, + { + "count": 1, + "name": "ISC" + }, + { + "count": 1, + "name": "New BSD, MIT, ISC, Apache 2.0" + }, + { + "count": 1, + "name": "unknown" + } + ], + "dependencies": [ + { + "licenses": [ + { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.txt" + }, + { + "name": "ISC", + "url": "http://en.wikipedia.org/wiki/ISC_license" + }, + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + { + "name": "New BSD", + "url": "http://opensource.org/licenses/BSD-3-Clause" + } + ], + "license": { + "name": "New BSD, MIT, ISC, Apache 2.0", + "url": "http://en.wikipedia.org/wiki/ISC_license" + }, + "dependency": { + "name": "cli", + "url": "https://github.com/npm/cli", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "ev-emitter", + "url": "https://github.com/metafizzy/ev-emitter", + "description": "lil' event emitter", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "fizzy-ui-utils", + "url": "https://github.com/metafizzy/fizzy-ui-utils", + "description": "UI utilities", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "get-size", + "url": "https://github.com/desandro/get-size", + "description": "measures element size", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "jquery", + "url": "https://github.com/jquery/jquery-dist", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "ISC", + "url": "http://en.wikipedia.org/wiki/ISC_license" + } + ], + "license": { + "name": "ISC", + "url": "http://en.wikipedia.org/wiki/ISC_license" + }, + "dependency": { + "name": "js-bower", + "description": "", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "masonry-layout", + "url": "https://masonry.desandro.com", + "description": "Cascading grid layout library", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "matches-selector", + "url": "https://github.com/desandro/matches-selector", + "description": "matches/matchesSelector helper", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + } + ], + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "outlayer", + "url": "https://github.com/metafizzy/outlayer", + "description": "the brains and guts of a layout library", + "pathes": [ + "." + ] + } + }, + { + "licenses": [ + { + "name": "unknown", + "url": "" + } + ], + "license": { + "name": "unknown" + }, + "dependency": { + "name": "stimulus.umd", + "description": "", + "pathes": [ + "." + ] + } + } + ] +}
\ No newline at end of file diff --git a/spec/fixtures/expected/js/bower/v2.0.json b/spec/fixtures/expected/js/bower/v2.0.json new file mode 100644 index 0000000..a8183e6 --- /dev/null +++ b/spec/fixtures/expected/js/bower/v2.0.json @@ -0,0 +1,150 @@ +{ + "version": "2.0", + "licenses": [ + { + "id": "MIT", + "name": "MIT License", + "url": "https://opensource.org/licenses/MIT", + "count": 8 + }, + { + "id": "ISC", + "name": "ISC License", + "url": "https://opensource.org/licenses/ISC", + "count": 2 + }, + { + "id": "Apache-2.0", + "name": "Apache License 2.0", + "url": "https://opensource.org/licenses/Apache-2.0", + "count": 1 + }, + { + "id": "BSD-3-Clause", + "name": "BSD 3-Clause \"New\" or \"Revised\" License", + "url": "https://opensource.org/licenses/BSD-3-Clause", + "count": 1 + }, + { + "id": "unknown", + "name": "unknown", + "url": "", + "count": 1 + } + ], + "dependencies": [ + { + "name": "cli", + "url": "https://github.com/npm/cli", + "description": "", + "paths": [ + "." + ], + "licenses": [ + "Apache-2.0", + "BSD-3-Clause", + "ISC", + "MIT" + ] + }, + { + "name": "ev-emitter", + "url": "https://github.com/metafizzy/ev-emitter", + "description": "lil' event emitter", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "fizzy-ui-utils", + "url": "https://github.com/metafizzy/fizzy-ui-utils", + "description": "UI utilities", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "get-size", + "url": "https://github.com/desandro/get-size", + "description": "measures element size", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "jquery", + "url": "https://github.com/jquery/jquery-dist", + "description": "", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "js-bower", + "url": "", + "description": "", + "paths": [ + "." + ], + "licenses": [ + "ISC" + ] + }, + { + "name": "masonry-layout", + "url": "https://masonry.desandro.com", + "description": "Cascading grid layout library", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "matches-selector", + "url": "https://github.com/desandro/matches-selector", + "description": "matches/matchesSelector helper", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "outlayer", + "url": "https://github.com/metafizzy/outlayer", + "description": "the brains and guts of a layout library", + "paths": [ + "." + ], + "licenses": [ + "MIT" + ] + }, + { + "name": "stimulus.umd", + "url": "", + "description": "", + "paths": [ + "." + ], + "licenses": [ + "unknown" + ] + } + ] +}
\ No newline at end of file diff --git a/spec/integration/js/bower_spec.rb b/spec/integration/js/bower_spec.rb index 2fe2883..e6d9012 100644 --- a/spec/integration/js/bower_spec.rb +++ b/spec/integration/js/bower_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' RSpec.describe "bower" do + include_examples "each report version", "js", "bower" + context "when scanning a simple bower project" do subject { runner.scan } |
