Moodle Plugin CI / Test (Moodle 5.2.2, PHP 8.4, mysql) (push) Successful in 3m1s
Moodle Plugin CI / Test (Moodle 4.5.13, PHP 8.1.34, postgresql) (push) Successful in 2m56s
Moodle Plugin CI / Test (Moodle 5.0.9, PHP 8.2.33, postgresql) (push) Successful in 3m9s
Moodle Plugin CI / Test (Moodle 5.1.6, PHP 8.2.33, postgresql) (push) Successful in 3m2s
Moodle Plugin CI / Test (Moodle 5.2.2, PHP 8.4, postgresql) (push) Successful in 3m31s
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
name: Moodle Plugin CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (Moodle ${{ matrix.moodle }}, PHP ${{ matrix.php }}, ${{ matrix.database }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- moodle: "5.2.2"
|
|
moodle_id: moodle52
|
|
php: "8.4"
|
|
php_image: moodlehq/moodle-php-apache:8.4@sha256:07cac70e0ed3f96f334ffeece92075b98adfbe4110312a3a9308b95eab8e2080
|
|
database: postgresql
|
|
profile: ""
|
|
service: ci
|
|
- moodle: "5.2.2"
|
|
moodle_id: moodle52
|
|
php: "8.4"
|
|
php_image: moodlehq/moodle-php-apache:8.4@sha256:07cac70e0ed3f96f334ffeece92075b98adfbe4110312a3a9308b95eab8e2080
|
|
database: mysql
|
|
profile: --profile mysql
|
|
service: ci-mysql
|
|
- moodle: "4.5.13"
|
|
moodle_id: moodle45
|
|
php: "8.1.34"
|
|
php_image: moodlehq/moodle-php-apache:8.1@sha256:13be2641be8883e79fd1e97374d0df759d80c81cce8331f3e85035923b7f4576
|
|
database: postgresql
|
|
profile: --profile moodle45
|
|
service: ci-moodle45
|
|
- moodle: "5.0.9"
|
|
moodle_id: moodle50
|
|
php: "8.2.33"
|
|
php_image: moodlehq/moodle-php-apache:8.2@sha256:3dae569f65e4ba1d2a413ea261d1dca72643bfa08a1e28a3d104a4024c4f040c
|
|
database: postgresql
|
|
profile: --profile moodle50
|
|
service: ci-moodle50
|
|
- moodle: "5.1.6"
|
|
moodle_id: moodle51
|
|
php: "8.2.33"
|
|
php_image: moodlehq/moodle-php-apache:8.2@sha256:3dae569f65e4ba1d2a413ea261d1dca72643bfa08a1e28a3d104a4024c4f040c
|
|
database: postgresql
|
|
profile: --profile moodle51
|
|
service: ci-moodle51
|
|
env:
|
|
COMPOSE_PROJECT_NAME: local_webhooks_${{ gitea.run_id }}_${{ gitea.run_attempt }}_${{ matrix.moodle_id }}_${{ matrix.database }}
|
|
steps:
|
|
- name: Check out repository
|
|
uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Build test image
|
|
run: docker compose ${{ matrix.profile }} build --pull --build-arg PHP_IMAGE=${{ matrix.php_image }} ${{ matrix.service }}
|
|
|
|
- name: Test plugin
|
|
run: docker compose ${{ matrix.profile }} up --abort-on-container-exit --exit-code-from ${{ matrix.service }} ${{ matrix.service }}
|
|
|
|
- name: Clean up
|
|
if: always()
|
|
run: docker compose ${{ matrix.profile }} down --volumes --remove-orphans --rmi local
|