Skip to content

Commit

Permalink
gha: 4.4.2 (add Behat artifact; drop phpcpd)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp committed Apr 8, 2024
1 parent fd39504 commit 60b86f1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
jobs:
test:
runs-on: 'ubuntu-latest'

services:
postgres:
image: postgres:13
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:

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

Expand All @@ -64,7 +65,8 @@ jobs:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
# none to use phpdbg fallback. Specify pcov (Moodle 3.10 and up) or xdebug to use them instead.
# If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug".
# If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems).
coverage: none

- name: Initialise moodle-plugin-ci
Expand Down Expand Up @@ -92,16 +94,13 @@ jobs:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
MUSTACHE_IGNORE_NAMES: 'mobile_view_page_latest.mustache,mobile_view_page_ionic3.mustache'
# Uncomment this to run Behat tests using the Moodle App.
# MOODLE_APP: 'true'

- name: PHP Lint
if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }}
run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }}
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }}
Expand Down Expand Up @@ -142,9 +141,19 @@ jobs:
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Behat features
id: behat
if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }}
run: moodle-plugin-ci behat --profile chrome

- name: Upload Behat Faildump
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat Faildump (${{ join(matrix.*, ', ') }})
path: ${{ github.workspace }}/moodledata/behat_dump
retention-days: 7
if-no-files-found: ignore

- name: Make sure cancelled jobs are marked as failures.
if: ${{ cancelled() }}
run: exit 1

0 comments on commit 60b86f1

Please sign in to comment.