Files
local_webhooks/.gitea/workflows/ci.yml
T
Valentin Popov 367fa38f44
Moodle Plugin CI / Test (Moodle 5.2.2, PHP 8.4, mysql) (push) Successful in 2m58s
Moodle Plugin CI / Test (Moodle 4.5.13, PHP 8.1.34, postgresql) (push) Successful in 2m59s
Moodle Plugin CI / Test (Moodle 5.2.2, PHP 8.4, postgresql) (push) Successful in 3m14s
ci: test Moodle 4.5 LTS
2026-08-24 00:21:28 +04:00

58 lines
2.0 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
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