Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
kabalin committed Mar 16, 2024
1 parent 3f5f45e commit 4fa80ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 68 deletions.
79 changes: 13 additions & 66 deletions .github/workflows/moodle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,10 @@ jobs:
- php: 8.2
moodle-branch: MOODLE_403_STABLE
database: pgsql

- php: 8.1
moodle-branch: MOODLE_402_STABLE
database: mariadb

- php: 8.1
moodle-branch: MOODLE_401_STABLE
database: pgsql

- php: 8.0
moodle-branch: MOODLE_400_STABLE
database: pgsql

- php: 8.0
moodle-branch: MOODLE_402_STABLE
database: pgsql

- php: 7.4
moodle-branch: MOODLE_401_STABLE
database: pgsql

- php: 7.3
moodle-branch: MOODLE_400_STABLE
database: mariadb

steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand All @@ -76,7 +55,7 @@ jobs:

- name: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
Expand All @@ -89,49 +68,17 @@ jobs:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: PHP Lint
if: ${{ always() }}
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

- name: Moodle PHPDoc Checker
if: ${{ always() }}
run: moodle-plugin-ci phpdoc

- name: Validating
if: ${{ always() }}
run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
run: moodle-plugin-ci savepoints

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

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

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

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
id: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci behat --profile chrome --tags @q1

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

5 changes: 3 additions & 2 deletions tests/behat/basic_actions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ Feature: Using course in flexsections format
And I open section "3" edit menu
And I click on "Add subsection" "link" in the "li#section-3" "css_element"

@q1
Scenario: Add sections and activities to flexsections format
Given I should see "First module"
And I should see "Second module"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
Then I should see "First module"
And I should see "Second module"
Then I should not see "First module"
And I should not see "Second module"

Scenario: Hiding section in flexsections format
When I open section "2" edit menu
Expand Down

0 comments on commit 4fa80ee

Please sign in to comment.