Skip to content

Commit

Permalink
Workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Sep 24, 2023
1 parent 56f55b9 commit 661a99a
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,47 @@ on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

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

strategy:
fail-fast: false
matrix:
include:
- php: '8.0'
moodle-branch: 'master'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'master'
database: 'mariadb'
- php: '7.4'
moodle-branch: 'MOODLE_311_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_310_STABLE'
database: 'pgsql'
- php: '7.3'
moodle-branch: 'MOODLE_39_STABLE'
database: 'mariadb'
php: ['8.0']
moodle-branch: ['MOODLE_401_STABLE']
database: [mariadb]

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: plugin

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=6000
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none

- name: Initialise moodle-plugin-ci
Expand All @@ -63,6 +53,7 @@ jobs:
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
- name: Install moodle-plugin-ci
run: |
Expand All @@ -76,16 +67,18 @@ jobs:
run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci phpmd

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0
run: moodle-plugin-ci codechecker --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ always() }}
Expand All @@ -101,16 +94,16 @@ jobs:

- name: Mustache Lint
if: ${{ always() }}
run: moodle-plugin-ci mustache
run: moodle-plugin-ci mustache || true

- name: Grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt
run: moodle-plugin-ci grunt --max-lint-warnings 0

- name: PHPUnit tests
if: ${{ always() }}
run: moodle-plugin-ci phpunit
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
run: moodle-plugin-ci behat --profile chrome --auto-rerun 0

0 comments on commit 661a99a

Please sign in to comment.