Skip to content

Commit

Permalink
Merge branch 'release-3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jsconan committed May 11, 2023
2 parents 7934729 + 0c0f041 commit c3d57ea
Show file tree
Hide file tree
Showing 8 changed files with 1,943 additions and 2,314 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
54 changes: 0 additions & 54 deletions .github/workflows/continous-integration.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Continuous integration

on:
pull_request:
branches: [develop]

jobs:
code-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- run: git fetch --tags --unshallow
- name: Check commit
if: always()
uses: oat-sa/conventional-commit-action@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install packages
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.BUILD_NPM_TOKEN }}
- name: Running tests
run: npm run test:cov
- name: Build coverage
run: npm run coverage:clover
- name: Report coverage
if: always()
uses: slavcodev/coverage-monitor-action@1.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clover_file: coverage/clover.xml
threshold_alert: 75
threshold_warning: 90
comment_mode: update
- name: Save Code Linting Report JSON
if: always()
run: npm run lint:report | true
- name: Annotate Code Linting Results
if: always()
continue-on-error: true
uses: ataylorme/eslint-annotate-action@1.2.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: 'eslint_report.json'
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ npm i --save @oat-sa/tao-test-runner

Available scripts in the project:

- `npm run test <testname>`: run test suite
- `testname` (optional): Specific test to run. If it is not provided, all will be ran.
- `npm run test:keepAlive`: start test server
- `npm run test:cov`: run `build:cov` and run tests
- `npm run test:dev`: test in development mode (watch changes and source maps)
- `npm run coverage`: show coverage report in terminal
- `npm run coverage:html`: show coverage report in browser
- `npm run build`: build for production into `dist` directory
- `npm run build:watch`: build for production into `dist` directory and watch for changes
- `npm run build:cov`: build for coverage into `dist` directory
- `npm run build:dev`: watch changes and build with source maps
- `npm run lint`: check syntax of code
- `npm run test <testname>`: run test suite
- `testname` (optional): Specific test to run. If it is not provided, all will be ran.
- `npm run test:keepAlive`: start test server
- `npm run test:cov`: run `build:cov` and run tests
- `npm run test:dev`: test in development mode (watch changes and source maps)
- `npm run coverage`: show coverage report in terminal
- `npm run coverage:html`: show coverage report in browser
- `npm run build`: build for production into `dist` directory
- `npm run build:watch`: build for production into `dist` directory and watch for changes
- `npm run build:cov`: build for coverage into `dist` directory
- `npm run build:dev`: watch changes and build with source maps
- `npm run build:all`: build `scss` files to `css` files, build for production into `dist` directory
- `npm run build:scss`: build `scss` files to `css` files
- `npm run lint:src`: check syntax of code
- `npm run lint:test`: check syntax of code in the unit tests
- `npm run lint:report`: build a syntax check report
2 changes: 1 addition & 1 deletion build/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { scssVendorDir, scssMainDir } = require('./path');

module.exports = {
plugins: [
require('postcss-node-sass')({
require('@csstools/postcss-sass')({
includePaths: [scssVendorDir, scssMainDir]
}),
require('autoprefixer')
Expand Down
26 changes: 17 additions & 9 deletions environment/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Copyright (c) 2019-2021 (original work) Open Assessment Technologies SA ;
*/

define(['/node_modules/@oat-sa/tao-core-libs/dist/pathdefinition.js'], function(libPathDefinition) {
define(['/node_modules/@oat-sa/tao-core-libs/dist/pathdefinition.js'], function (libPathDefinition) {
requirejs.config({
baseUrl: '/',
paths: Object.assign(
Expand Down Expand Up @@ -72,20 +72,21 @@ define(['/node_modules/@oat-sa/tao-core-libs/dist/pathdefinition.js'], function(
'css!basicStyle/tao-main-style.css',
'css!basicStyle/new-test-runner.css'
]);
define('qunitEnv', ['qunitLibs', 'qunit-parameterize'], function() {
define('qunitEnv', ['qunitLibs', 'qunit-parameterize'], function () {
requirejs.config({ nodeIdCompat: true });
});

define('context', ['module'], function(module) {
define('context', ['module'], function (module) {
return module.config();
});

define('i18n', ['core/format'], format => (text, ...variables) => {
if (variables) {
text = format(text, ...variables);
}
return text;
});
define('i18n', ['core/format'], format =>
(text, ...variables) => {
if (variables) {
text = format(text, ...variables);
}
return text;
});

define('taoQtiItem/portableElementRegistry/assetManager/portableAssetStrategy', [], () => ({
name: 'mock',
Expand All @@ -109,4 +110,11 @@ define(['/node_modules/@oat-sa/tao-core-libs/dist/pathdefinition.js'], function(
}
}));
define('taoQtiItem/portableElementRegistry/provider/sideLoadingProviderFactory', [], () => {});
define('services/features', function () {
return {
isVisible: function () {
return true;
}
};
});
});
Loading

0 comments on commit c3d57ea

Please sign in to comment.