Skip to content

Commit 619ae6d

Browse files
committed
ci: only use requested images; enable opcache; preload npm
1 parent e312322 commit 619ae6d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
services:
1010
postgres:
11-
image: postgres:15
11+
image: ${{ matrix.database == 'pgsql' && 'postgres:16' || '' }}
1212
env:
1313
POSTGRES_USER: 'postgres'
1414
POSTGRES_HOST_AUTH_METHOD: 'trust'
@@ -17,7 +17,7 @@ jobs:
1717
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
1818

1919
mariadb:
20-
image: mariadb:10
20+
image: ${{ matrix.database == 'mariadb' && 'mariadb:10' || '' }}
2121
env:
2222
MYSQL_USER: 'root'
2323
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
@@ -52,7 +52,7 @@ jobs:
5252

5353
steps:
5454
- name: Check out repository code
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5656
with:
5757
path: plugin
5858

@@ -61,7 +61,8 @@ jobs:
6161
with:
6262
php-version: ${{ matrix.php }}
6363
extensions: ${{ matrix.extensions }}
64-
ini-values: max_input_vars=5000
64+
ini-values: max_input_vars=5000, opcache.enable_cli=1, opcache.file_cache=/tmp/, opcache.validate_timestamps=0
65+
6566
# If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug".
6667
# If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems).
6768
coverage: none
@@ -83,6 +84,11 @@ jobs:
8384
sudo locale-gen en_AU.UTF-8
8485
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
8586
87+
- name: Preload node from local
88+
uses: actions/setup-node@v6
89+
with:
90+
node-version: 'lts/jod'
91+
8692
- name: Install moodle-plugin-ci
8793
id: install_ci
8894
run: |

0 commit comments

Comments
 (0)