Skip to content

Commit 443234e

Browse files
committed
resolve merge conflicts
2 parents 09a4620 + 2e91aeb commit 443234e

22 files changed

+118
-304
lines changed

Diff for: .github/workflows/config.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"main-moodle": "MOODLE_405_STABLE",
3+
"main-php": "8.3",
4+
"moodle-php": {
5+
"MOODLE_403_STABLE": ["8.0", "8.2"],
6+
"MOODLE_404_STABLE": ["8.1", "8.3"],
7+
"MOODLE_405_STABLE": ["8.1", "8.2", "8.3"]
8+
},
9+
"moodle-plugin-ci": "4.5.5"
10+
}

Diff for: .github/workflows/moodle-ci.yml

+6-181
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,9 @@
11
name: Moodle Plugin CI
2-
3-
on: [push, pull_request]
2+
on: [ push, pull_request ]
43

54
jobs:
6-
static:
7-
runs-on: ubuntu-latest
8-
9-
strategy:
10-
matrix:
11-
php: ['8.3']
12-
moodle-branch: ['MOODLE_405_STABLE']
13-
database: ['pgsql']
14-
15-
steps:
16-
- name: Start PostgreSQL
17-
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14
18-
19-
- name: Check out repository code
20-
uses: actions/checkout@v3
21-
with:
22-
path: plugin
23-
24-
- name: Setup PHP ${{ matrix.php }}
25-
uses: shivammathur/setup-php@v2
26-
with:
27-
php-version: ${{ matrix.php }}
28-
ini-values: max_input_vars=5000
29-
coverage: none
30-
31-
- name: Get composer cache directory
32-
id: composer-cache
33-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
34-
35-
- name: Composer cache
36-
uses: actions/cache@v3
37-
with:
38-
path: ${{ steps.composer-cache.outputs.dir }}
39-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-composer-
42-
43-
- name: npm cache
44-
uses: actions/cache@v3
45-
with:
46-
path: ~/.npm
47-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
48-
restore-keys: |
49-
${{ runner.os }}-node-
50-
51-
- name: Initialise moodle-plugin-ci
52-
run: |
53-
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci 4.5.4
54-
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
55-
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
56-
sudo locale-gen en_AU.UTF-8
57-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
58-
59-
- name: Install moodle-plugin-ci
60-
run: |
61-
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 --no-init
62-
env:
63-
DB: ${{ matrix.database }}
64-
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
65-
66-
- name: PHP Lint
67-
if: ${{ always() }}
68-
run: moodle-plugin-ci phplint
69-
70-
- name: PHP Copy/Paste Detector
71-
if: ${{ always() }}
72-
run: moodle-plugin-ci phpcpd
73-
continue-on-error: true
74-
75-
- name: PHP Mess Detector
76-
if: ${{ always() }}
77-
run: moodle-plugin-ci phpmd
78-
79-
- name: Moodle Code Checker
80-
if: ${{ always() }}
81-
run: moodle-plugin-ci codechecker
82-
83-
- name: Moodle PHPDoc Checker
84-
if: ${{ always() }}
85-
run: moodle-plugin-ci phpdoc
86-
continue-on-error: true
87-
88-
- name: Validating
89-
if: ${{ always() }}
90-
run: moodle-plugin-ci validate
91-
92-
- name: Check upgrade savepoints
93-
if: ${{ always() }}
94-
run: moodle-plugin-ci savepoints
95-
96-
- name: Mustache Lint
97-
if: ${{ always() }}
98-
run: moodle-plugin-ci mustache
99-
continue-on-error: true
100-
101-
- name: Grunt
102-
if: ${{ always() }}
103-
run: moodle-plugin-ci grunt
104-
continue-on-error: true
105-
106-
test:
107-
runs-on: ubuntu-latest
108-
needs: static
109-
110-
strategy:
111-
fail-fast: false
112-
matrix:
113-
php: ['8.0', '8.1', '8.2', '8.3']
114-
moodle-branch: ['MOODLE_403_STABLE', 'MOODLE_404_STABLE', 'MOODLE_405_STABLE']
115-
database: ['mariadb', 'pgsql']
116-
exclude:
117-
- php: '8.0'
118-
moodle-branch: 'MOODLE_404_STABLE'
119-
- php: '8.0'
120-
moodle-branch: 'MOODLE_405_STABLE'
121-
- php: '8.3'
122-
moodle-branch: 'MOODLE_403_STABLE'
123-
124-
steps:
125-
- name: Start MariaDB
126-
if: matrix.database == 'mariadb'
127-
run: docker run -p 3306:3306 -e MYSQL_USER=root -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d mariadb:10
128-
129-
- name: Start PostgreSQL
130-
if: matrix.database == 'pgsql'
131-
run: docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14
132-
133-
- name: Check out repository code
134-
uses: actions/checkout@v3
135-
with:
136-
path: plugin
137-
138-
- name: Setup PHP ${{ matrix.php }}
139-
uses: shivammathur/setup-php@v2
140-
with:
141-
php-version: ${{ matrix.php }}
142-
ini-values: max_input_vars=5000
143-
coverage: none
144-
145-
- name: Get composer cache directory
146-
id: composer-cache
147-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
148-
- name: Composer cache
149-
uses: actions/cache@v3
150-
with:
151-
path: ${{ steps.composer-cache.outputs.dir }}
152-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
153-
restore-keys: |
154-
${{ runner.os }}-composer-
155-
- name: npm cache
156-
uses: actions/cache@v3
157-
with:
158-
path: ~/.npm
159-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
160-
restore-keys: |
161-
${{ runner.os }}-node-
162-
163-
- name: Initialise moodle-plugin-ci
164-
run: |
165-
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci 4.5.4
166-
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
167-
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
168-
sudo locale-gen en_AU.UTF-8
169-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
170-
171-
- name: Install moodle-plugin-ci
172-
run: |
173-
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
174-
env:
175-
DB: ${{ matrix.database }}
176-
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
177-
178-
- name: PHPUnit tests
179-
if: ${{ always() }}
180-
run: moodle-plugin-ci phpunit
181-
182-
- name: Behat features
183-
if: ${{ always() }}
184-
run: moodle-plugin-ci behat --auto-rerun 0
5+
call:
6+
name: ""
7+
uses: learnweb/moodle-workflows-learnweb/.github/workflows/moodle-ci.yml@main
8+
with:
9+
allow-mustache-lint-error: true

Diff for: .github/workflows/moodle-release.yml

+7-49
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,12 @@
1-
#
2-
# Whenever a new tag starting with "v" is pushed, add the tagged version
3-
# to the Moodle Plugins directory at https://moodle.org/plugins
4-
#
5-
# revision: 2021070201
6-
# Changed to be released on Github release with the release notes.
7-
#
8-
name: Releasing in the Plugins directory
1+
name: Moodle Plugin Release
92

103
on:
114
release:
12-
types: [published]
13-
14-
defaults:
15-
run:
16-
shell: bash
5+
types: [ published ]
176

187
jobs:
19-
release-at-moodle-org:
20-
runs-on: ubuntu-latest
21-
env:
22-
PLUGIN: mod_moodleoverflow
23-
CURL: curl -s
24-
ENDPOINT: https://moodle.org/webservice/rest/server.php
25-
TOKEN: ${{ secrets.MOODLE_ORG_TOKEN }}
26-
FUNCTION: local_plugins_add_version
27-
28-
steps:
29-
- name: Call the service function
30-
id: add-version
31-
run: |
32-
TAGNAME="${{ github.event.release.tag_name }}"
33-
BODY="${{ github.event.release.body }}"
34-
ZIPURL="${{ github.event.release.zipball_url }}"
35-
RESPONSE=$(${CURL} ${ENDPOINT} --data-urlencode "wstoken=${TOKEN}" \
36-
--data-urlencode "wsfunction=${FUNCTION}" \
37-
--data-urlencode "moodlewsrestformat=json" \
38-
--data-urlencode "frankenstyle=${PLUGIN}" \
39-
--data-urlencode "zipurl=${ZIPURL}" \
40-
--data-urlencode "vcssystem=git" \
41-
--data-urlencode "vcsrepositoryurl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \
42-
--data-urlencode "vcstag=${TAGNAME}" \
43-
--data-urlencode "changelogurl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commits/${TAGNAME}" \
44-
--data-urlencode "altdownloadurl=${ZIPURL}" \
45-
--data-urlencode "releasenotes=${BODY@Q}" \
46-
--data-urlencode "releasenotesformat=4")
47-
echo "response=${RESPONSE}" >> $GITHUB_OUTPUT
48-
- name: Evaluate the response
49-
id: evaluate-response
50-
env:
51-
RESPONSE: ${{ steps.add-version.outputs.response }}
52-
run: |
53-
jq <<< ${RESPONSE}
54-
jq --exit-status ".id" <<< ${RESPONSE} > /dev/null
8+
call-moodle-release-workflow:
9+
uses: learnweb/moodle-workflows-learnweb/.github/workflows/moodle-release.yml@main
10+
with:
11+
plugin-name: 'mod_moodleoverflow'
12+
secrets: inherit

Diff for: amd/build/activityhelp.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: amd/build/activityhelp.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)