Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions and Test Coverage #485

Merged
merged 25 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
09e8cfc
Got some tests to work
adpare Jul 29, 2022
a8c3461
Merge branch 'github-action-test' of github.com:mitre-attack/attack-n…
adpare Jul 29, 2022
3f458a8
Lot of changes
adpare Jul 29, 2022
a38f972
Package-lock fix?
adpare Jul 29, 2022
6ef259c
updating npm
adpare Jul 29, 2022
6e1bafc
Trying another fx
adpare Jul 29, 2022
0bbbcd9
Trying fix for config file
adpare Jul 29, 2022
89e598e
Trying fix for config file
adpare Jul 29, 2022
9940f6d
trying sourcemap fix
adpare Jul 29, 2022
910f7aa
does not work sourcemap fix
adpare Jul 29, 2022
82215dc
Add Node versions to matrix, switch order to test before building
jondricek Jul 29, 2022
18922d4
Test Node 14.x
jondricek Jul 29, 2022
127b17c
Node v12 again, and chrome-headless for testing in CI
jondricek Jul 29, 2022
823e4d6
Set source-map to false
jondricek Jul 31, 2022
fb68ec5
Try another approach for GitHub Actions testing
jondricek Jul 31, 2022
d1312cd
Minor whitespace fixes
jondricek Jul 31, 2022
4f88b90
Update test for App Title
jondricek Jul 31, 2022
654a2e9
Update coverage reporting for unit tests
jondricek Jul 31, 2022
149da45
Fix typo in test name
jondricek Jul 31, 2022
4986c85
Address list component test
jondricek Aug 2, 2022
fcbb2cb
Partial attempt at technique cell test
jondricek Aug 2, 2022
4c2631f
changed double quotes to single quotes in accordance with TSLint rule
seansica Aug 3, 2022
a1e252b
Enable Jasmine unit test that validates that an instance of Technique…
seansica Aug 3, 2022
8790c40
Added two different approaches for component injection; one that prov…
seansica Aug 4, 2022
797d2a9
fix save calls for IE to match declaration; re-add spread syntax for …
clemiller Aug 9, 2022
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
9 changes: 4 additions & 5 deletions .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: npm install and npm run build
- name: npm install, test, build
run: |
cd nav-app/
npm ci
npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI --code-coverage --source-map=false
npm run build
- name: Upload content
uses: actions/upload-artifact@v3
with:
name: App-directory
path: nav-app/dist/

name: App-directory
path: nav-app/dist/
32 changes: 26 additions & 6 deletions nav-app/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ module.exports = function (config) {
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-chrome-launcher'),
require('karma-coverage'),
// require('karma-coverage-istanbul-reporter'),
require('karma-jasmine'),
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
Expand All @@ -20,13 +21,32 @@ module.exports = function (config) {
fixWebpackSourcePaths: true
},

reporters: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['Chrome', 'ChromeHeadlessCI'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: false,
webpack: { node: { fs: 'empty', } } //https://github.com/angular/angular-cli/issues/8357
webpack: { node: { fs: 'empty', } }, // https://github.com/angular/angular-cli/issues/8357

// For code coverage
files: [
'src/**/*.ts'
],
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
type : 'html',
dir : 'coverage/'
}

});
};
Loading