Skip to content

Commit

Permalink
Adapt ci config.
Browse files Browse the repository at this point in the history
  • Loading branch information
srobotta committed Dec 23, 2024
1 parent 70f267a commit 2ce3058
Show file tree
Hide file tree
Showing 26 changed files with 200 additions and 267 deletions.
115 changes: 7 additions & 108 deletions .github/workflows/moodle-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3

mariadb:
image: mariadb:10.6
image: mariadb:10
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand All @@ -31,84 +31,9 @@ jobs:
fail-fast: false
matrix:
include:
- php: 7.4
moodle-branch: MOODLE_401_STABLE
database: mariadb
- php: 7.4
moodle-branch: MOODLE_401_STABLE
database: pgsql
- php: 8.0
moodle-branch: MOODLE_401_STABLE
database: mariadb
- php: 8.0
moodle-branch: MOODLE_401_STABLE
database: pgsql
- php: 8.1
moodle-branch: MOODLE_401_STABLE
database: mariadb
- php: 8.1
moodle-branch: MOODLE_401_STABLE
database: pgsql
- php: 8.1
moodle-branch: MOODLE_402_STABLE
database: mariadb
- php: 8.1
moodle-branch: MOODLE_402_STABLE
database: pgsql
- php: 8.1
moodle-branch: MOODLE_403_STABLE
database: mariadb
- php: 8.1
moodle-branch: MOODLE_403_STABLE
database: pgsql
- php: 8.1
moodle-branch: MOODLE_404_STABLE
database: mariadb
- php: 8.1
moodle-branch: MOODLE_404_STABLE
database: pgsql
- php: 8.1
moodle-branch: MOODLE_405_STABLE
database: mariadb
- php: 8.1
moodle-branch: MOODLE_405_STABLE
database: pgsql
- php: 8.2
moodle-branch: MOODLE_402_STABLE
database: mariadb
- php: 8.2
moodle-branch: MOODLE_402_STABLE
database: pgsql
- php: 8.2
moodle-branch: MOODLE_403_STABLE
database: mariadb
- php: 8.2
moodle-branch: MOODLE_403_STABLE
database: pgsql
- php: 8.2
moodle-branch: MOODLE_404_STABLE
database: mariadb
- php: 8.2
moodle-branch: MOODLE_404_STABLE
database: pgsql
- php: 8.2
moodle-branch: MOODLE_405_STABLE
database: mariadb
- php: 8.2
moodle-branch: MOODLE_405_STABLE
database: pgsql
- php: 8.3
moodle-branch: MOODLE_404_STABLE
database: mariadb
- php: 8.3
moodle-branch: MOODLE_404_STABLE
database: pgsql
- php: 8.3
moodle-branch: MOODLE_405_STABLE
database: mariadb
- php: 8.3
moodle-branch: MOODLE_405_STABLE
database: pgsql

steps:
- name: Check out repository code
Expand Down Expand Up @@ -138,9 +63,9 @@ jobs:
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
IGNORE_PATHS: 'moodle/tests/fixtures,moodle/Sniffs,classes/vendor'
PHPCS_IGNORE_PATHS: /^classes\/vendor/
PHPDOCCHECKER_IGNORE_PATHS: /^classes\/vendor/
IGNORE_PATHS: 'moodle/tests/fixtures,moodle/Sniffs,classes/vendor,fonts'
PHPCS_IGNORE_PATHS: '/^classes\/vendor/,/^fonts/'
PHPDOCCHECKER_IGNORE_PATHS: '/^classes\/vendor/,/^fonts/'
MUSTACHE_IGNORE_NAMES: 'report.mustache,questionnaire.mustache'

- name: PHP Lint
Expand All @@ -152,35 +77,9 @@ jobs:
if: ${{ always() }}
run: moodle-plugin-ci phpmd

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci phpcs --max-warnings 0 || true

- name: Moodle PHPDoc Checker
if: ${{ always() }}
run: moodle-plugin-ci phpdoc || true

- name: Validating
if: ${{ always() }}
run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
run: moodle-plugin-ci savepoints

- name: Mustache Lint
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt || true

- name: PHPUnit tests
if: ${{ always() }}
run: moodle-plugin-ci phpunit --coverage-text || true
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
- name: Setup upterm session
uses: lhotari/action-upterm@v1
2 changes: 1 addition & 1 deletion amd/build/edit_items.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/questionnaire.min.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion amd/build/report.min.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions amd/src/edit_items.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ define([
sum += parseFloat($(this).val());
});

if(sum != 1) {
if (sum != 1) {
$('.category-percentage').addClass('is-invalid');
$('#percentage-total').addClass('text-danger');
$('#percentage-total-value').text(parseFloat(sum * 100).toFixed(2));
Expand Down Expand Up @@ -113,7 +113,7 @@ define([

$(ACTIONS.ITEM_MULTIPLIER_CHANGED).change(function(e) {
e.preventDefault();
if(this.value > 5) {
if (this.value > 5) {
this.value = 5.00;
}
this.value = parseFloat(this.value).toFixed(2);
Expand Down
Loading

0 comments on commit 2ce3058

Please sign in to comment.