Adding CircleCI and Code Climate
This commit is contained in:
@@ -19,6 +19,11 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Update npm
|
||||
- run:
|
||||
name: update-npm
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
@@ -28,10 +33,59 @@ jobs:
|
||||
|
||||
- run: npm install
|
||||
|
||||
- run: npm install mocha-junit-reporter # just for CircleCI
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
# run tests!
|
||||
- run: ./node_modules/.bin/mocha --require @babel/register
|
||||
- run: mkdir reports
|
||||
|
||||
# Run mocha
|
||||
- run:
|
||||
name: npm test
|
||||
command: ./node_modules/.bin/nyc ./node_modules/.bin/mocha --require @babel/register --recursive --timeout=10000 --exit --reporter mocha-junit-reporter --reporter-options mochaFile=reports/mocha/test-results.xml
|
||||
when: always
|
||||
|
||||
# Run eslint
|
||||
- run:
|
||||
name: eslint
|
||||
command: |
|
||||
./node_modules/.bin/eslint ./ --format junit --output-file ./reports/eslint/eslint.xml
|
||||
when: always
|
||||
|
||||
# Run coverage report for Code Climate
|
||||
- run:
|
||||
name: Setup Code Climate test-reporter
|
||||
command: |
|
||||
# download test reporter as a static binary
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
./cc-test-reporter before-build
|
||||
when: always
|
||||
|
||||
- run:
|
||||
name: code-coverage
|
||||
command: |
|
||||
mkdir coverage
|
||||
# nyc report requires that nyc has already been run,
|
||||
# which creates the .nyc_output folder containing necessary data
|
||||
./node_modules/.bin/nyc report --reporter=text-lcov > coverage/lcov.info
|
||||
./cc-test-reporter after-build -t lcov
|
||||
when: always
|
||||
|
||||
# Upload results
|
||||
|
||||
- store_test_results:
|
||||
path: reports
|
||||
|
||||
- store_artifacts:
|
||||
path: ./reports/mocha/test-results.xml
|
||||
|
||||
- store_artifacts:
|
||||
path: ./reports/eslint/eslint.xml
|
||||
|
||||
- store_artifacts: # upload test coverage as artifact
|
||||
path: ./coverage/lcov.info
|
||||
prefix: tests
|
||||
|
||||
43
README.md
43
README.md
@@ -1,37 +1,10 @@
|
||||
## Welcome to GitHub Pages
|
||||
[](https://circleci.com/gh/jcputney/scorm-again) [](https://codeclimate.com/github/jcputney/scorm-again/maintainability) [](https://codeclimate.com/github/jcputney/scorm-again/test_coverage)
|
||||
|
||||
You can use the [editor on GitHub](https://github.com/jcputney/scorm-again/edit/master/README.md) to maintain and preview the content for your website in Markdown files.
|
||||
## SCORM Again
|
||||
This project was created to modernize the SCORM JavaScript runtime, and to provide a stable, tested platform for running AICC, SCORM 1.2, and SCORM 2004 modules. This module is designed to be LMS agnostic, and is written to be able to be run without a backing LMS, logging all function calls and data instead of committing, if an LMS endpoint is not configured.
|
||||
|
||||
Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.
|
||||
|
||||
### Markdown
|
||||
|
||||
Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for
|
||||
|
||||
```markdown
|
||||
Syntax highlighted code block
|
||||
|
||||
# Header 1
|
||||
## Header 2
|
||||
### Header 3
|
||||
|
||||
- Bulleted
|
||||
- List
|
||||
|
||||
1. Numbered
|
||||
2. List
|
||||
|
||||
**Bold** and _Italic_ and `Code` text
|
||||
|
||||
[Link](url) and 
|
||||
```
|
||||
|
||||
For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/).
|
||||
|
||||
### Jekyll Themes
|
||||
|
||||
Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/jcputney/scorm-again/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file.
|
||||
|
||||
### Support or Contact
|
||||
|
||||
Having trouble with Pages? Check out our [documentation](https://help.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out.
|
||||
### What is this not?
|
||||
1. This is not an LMS
|
||||
1. This does not handle the uploading and verification of SCORM/AICC modules
|
||||
1. This project does not **currently** support the TinCan/xAPI runtime, but is it something I am considering in the very near future.
|
||||
1. This project is __NOT__ complete!!
|
||||
1324
package-lock.json
generated
1324
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -16,12 +16,12 @@
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/register": "^7.7.0",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.6.0",
|
||||
"mocha": "^6.2.2",
|
||||
"nodemon": "^1.19.4",
|
||||
"nyc": "^14.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/mocha --compilers js:@babel/register"
|
||||
"test": "./node_modules/.bin/mocha --require @babel/register"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user