Skip to content

Commit 5f14c64

Browse files
committed
update .gitlab pipeline
1 parent d2ec0b9 commit 5f14c64

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

.github/workflows/moodle-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ jobs:
9696
if: ${{ !cancelled() }}
9797
run: moodle-plugin-ci mustache ./plugin
9898

99-
# no javascript used in this pluing
100-
# - name: Grunt
101-
# if: ${{ !cancelled() }}
102-
# run: moodle-plugin-ci grunt --max-lint-warnings 0 ./plugin
99+
- name: Grunt
100+
if: ${{ !cancelled() }}
101+
run: moodle-plugin-ci grunt --max-lint-warnings 0 ./plugin
103102

104103
- name: PHPUnit tests
105104
if: ${{ !cancelled() }}

.gitlab-ci.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ default:
2222
cache:
2323
paths:
2424
- .cache
25-
- vendor/
2625

2726
image: moodlehq/moodle-php-apache:8.3
2827
before_script:
@@ -34,15 +33,13 @@ default:
3433
- nvm install --default --latest-npm lts/gallium
3534
- composer create-project -n --no-dev --no-progress --no-ansi --prefer-dist moodlehq/moodle-plugin-ci /opt/moodle-plugin-ci ^4
3635
- export PATH="/opt/moodle-plugin-ci/bin:/opt/moodle-plugin-ci/vendor/bin:$PATH"
37-
# TODO not always needed
38-
# install moodle
39-
# - moodle-plugin-ci install --db-host db
40-
# - '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }'
4136

42-
# install dependencies:
43-
# stage: prepare
44-
# script:
45-
# composer install
37+
check dependencies:
38+
stage: test
39+
script:
40+
- composer validate --strict
41+
# NOTE: run composer update if you get errors here
42+
- composer outdated --strict
4643

4744
test:
4845
stage: test
@@ -60,13 +57,16 @@ test:
6057
variables:
6158
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes'
6259
script:
63-
- composer install
6460
- apt update
6561
- apt -yqq install --no-install-suggests default-jre-headless mariadb-client
6662
- moodle-plugin-ci install --moodle=/opt/moodle --db-name moodle --db-host db
6763
- moodle-plugin-ci phplint $CI_PROJECT_DIR
6864
- moodle-plugin-ci phpunit $CI_PROJECT_DIR
6965
- moodle-plugin-ci validate $CI_PROJECT_DIR
66+
- moodle-plugin-ci phpmd
67+
- moodle-plugin-ci mustache
68+
- moodle-plugin-ci grunt
69+
- moodle-plugin-ci phpdoc
7070
- moodle-plugin-ci behat --auto-rerun 0 --profile chrome $CI_PROJECT_DIR
7171

7272

@@ -75,15 +75,9 @@ validate:
7575
# image: moodlehq/moodle-php-apache:7
7676
image: moodlehq/moodle-php-apache:8.1
7777
script:
78-
- composer install
7978
# - validate-version # TODO complains about CHANGELOG.md, even if it exist double check
8079
- moodle-plugin-ci savepoints $CI_PROJECT_DIR
8180

82-
# TODO
83-
# - moodle-plugin-ci phpmd
84-
# - moodle-plugin-ci mustache
85-
# - moodle-plugin-ci grunt
86-
# - moodle-plugin-ci phpdoc
8781

8882
moodle-lint:
8983
stage: test
@@ -100,9 +94,6 @@ package plugin:
10094
- apt update
10195
- apt install zip -y
10296
script:
103-
- rm -rf vendor/ .cache
104-
- 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer'
105-
- composer install --no-dev
10697
- 'version=$(sed -n ''s/\s*$plugin->version\s*=\s\([0-9]*\);.*/\1/p'' version.php)'
10798
- 'echo "version: ${version}"'
10899
- 'folder="$(basename $CI_PROJECT_DIR)"'

0 commit comments

Comments
 (0)