Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ewallah authored Nov 17, 2023
1 parent ab3c61c commit 1654292
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,12 @@ jobs:
name: ci
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
options: --health-cmd="pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
mariadb:
image: mariadb:10
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_CHARACTER_SET_SERVER: "utf8mb4"
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
ports:
- 3306:3306

strategy:
fail-fast: false
matrix:
php: ['8.1']
moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'master']
database: ['mariadb', 'pgsql']
include:
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_311_STABLE'
database: pgsql
- php: '8.2'
moodle-branch: 'MOODLE_403_STABLE'
database: 'pgsql'
moodle-branch: ['MOODLE_401_STABLE']
database: ['mysql']

steps:
- name: checkout plugin
Expand All @@ -60,6 +30,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: edu-sharing/plugin-moodle-edu-sharing
submodules: true
path: extras/mod_edu-sharing

- name: setup PHP
Expand All @@ -75,9 +46,10 @@ jobs:
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
sudo systemctl start mysql.service
- name: install Moodle
run: moodle-plugin-ci install --db-host=127.0.0.1 --plugin this-plugin --extra-plugins=extras
run: moodle-plugin-ci install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin --extra-plugins=extras
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
Expand Down

0 comments on commit 1654292

Please sign in to comment.