diff --git a/.github/workflows/moodle-plugin-ci-push.yml b/.github/workflows/moodle-plugin-ci-push.yml index 0383fac93..2036199da 100644 --- a/.github/workflows/moodle-plugin-ci-push.yml +++ b/.github/workflows/moodle-plugin-ci-push.yml @@ -46,10 +46,23 @@ jobs: database: mariadb steps: + - name: Setup unique workspace + run: | + MATRIX_ID="${{ matrix.php }}-${{ matrix.database }}-${{ matrix.moodle-branch }}" + WORKSPACE="/home/action/actions-runner/_work/moodle-local_catquiz/moodle-local_catquiz-${MATRIX_ID}" + rm -rf "$WORKSPACE" + mkdir -p "$WORKSPACE" + echo "MATRIX_WORKSPACE=$WORKSPACE" >> $GITHUB_ENV + - name: Check out repository code uses: actions/checkout@v3 with: - path: plugin + path: ${{ env.MATRIX_WORKSPACE }}/plugin + +# - name: Check out repository code +# uses: actions/checkout@v3 +# with: +# path: plugin - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 @@ -73,6 +86,7 @@ jobs: - name: Initialise moodle-plugin-ci run: | + cd ${{ env.MATRIX_WORKSPACE }} export NVM_DIR="$HOME/.nvm" [ -s $NVM_DIR/nvm.sh ] && source $NVM_DIR/nvm.sh composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4 @@ -81,6 +95,7 @@ jobs: sudo locale-gen en_AU.UTF-8 echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV - name: Install moodle-plugin-ci + working-directory: ${{ env.MATRIX_WORKSPACE }} run: | moodle-plugin-ci add-plugin --branch main Wunderbyte-GmbH/moodle-local_wunderbyte_table moodle-plugin-ci add-plugin --branch catmodel_main Wunderbyte-GmbH/moodle-mod_adaptivequiz @@ -94,47 +109,58 @@ jobs: MUSTACHE_IGNORE_NAMES: 'feedbackform_collapsible_close.mustache,feedbackform_collapsible_open.mustache,catscaleshortcodetablechildren.mustache' - name: PHP Lint + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci phplint - name: PHP Copy/Paste Detector + working-directory: ${{ env.MATRIX_WORKSPACE }} continue-on-error: true # This step will show errors but will not fail if: ${{ always() }} run: moodle-plugin-ci phpcpd - name: PHP Mess Detector + working-directory: ${{ env.MATRIX_WORKSPACE }} continue-on-error: true # This step will show errors but will not fail if: ${{ always() }} run: moodle-plugin-ci phpmd - name: Moodle Code Checker + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci codechecker --max-warnings 0 - name: Moodle PHPDoc Checker + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci phpdoc - name: Validating + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci validate - name: Check upgrade savepoints + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci savepoints - name: Mustache Lint + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci mustache - name: Grunt + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci grunt --max-lint-warnings 0 - name: PHPUnit tests + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci phpunit --testdox - name: Behat features + working-directory: ${{ env.MATRIX_WORKSPACE }} if: ${{ always() }} run: moodle-plugin-ci behat --profile chrome